diff --git a/src/gallia/uds/ecu.py b/src/gallia/uds/ecu.py index 1e4d99381..2e5fab3f5 100644 --- a/src/gallia/uds/ecu.py +++ b/src/gallia/uds/ecu.py @@ -332,14 +332,16 @@ async def _wait_for_ecu(self, sleep_time: float) -> None: async def wait_for_ecu( self, timeout: Optional[float] = None, - ) -> None: + ) -> bool: """wait for ecu to be alive again (eg. after reset) Wait at most timeout""" t = timeout if timeout is not None else self.timeout try: await asyncio.wait_for(self._wait_for_ecu(t * 0.8), timeout=t) + return True except asyncio.TimeoutError: self.logger.log_critical("Timeout while waiting for ECU!") + return False async def update_state( self, request: service.UDSRequest, response: service.UDSResponse