Skip to content

Commit aa2505b

Browse files
committed
init-geth will exit if any client exit
1 parent f73f77f commit aa2505b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

GethNode/init-geth

+17-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,23 @@ def main():
177177
signal.signal(signal.SIGINT, OnTerminate)
178178

179179
# wait for termination
180-
TERMINATE_EVENT.wait()
180+
while not TERMINATE_EVENT.is_set():
181+
if execCltProc is not None and execCltProc.poll() is not None:
182+
raise RuntimeError(
183+
f'Execution client process terminated with code '
184+
f'{execCltProc.returncode}'
185+
)
186+
if consCltProc is not None and consCltProc.poll() is not None:
187+
raise RuntimeError(
188+
f'Consensus client process terminated with code '
189+
f'{consCltProc.returncode}'
190+
)
191+
if valiCltProc is not None and valiCltProc.poll() is not None:
192+
raise RuntimeError(
193+
f'Validator client process terminated with code '
194+
f'{valiCltProc.returncode}'
195+
)
196+
TERMINATE_EVENT.wait(1.0)
181197
finally:
182198
# terminate processes
183199
TerminateProc(consCltProc)

0 commit comments

Comments
 (0)