From bf2bdeb85e370116406c7ca35085f820619c4041 Mon Sep 17 00:00:00 2001 From: John Wason Date: Mon, 4 Mar 2024 21:46:54 -0500 Subject: [PATCH] Fix process restart after error exit --- drekar_launch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drekar_launch.py b/drekar_launch.py index 88abaaf..a1f02b0 100644 --- a/drekar_launch.py +++ b/drekar_launch.py @@ -126,7 +126,8 @@ async def run(self): if not s.restart: break if self._keep_going: - await self.exit_event.wait(s.restart_backoff) + with suppress(asyncio.TimeoutError): + await asyncio.wait_for(self.parent.exit_event.wait(), timeout=s.restart_backoff) @property def process_state(self):