From 397b2a9e1171b2bfcf96d7364ac700beee44d81e Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 3 Jun 2022 00:12:06 -0700 Subject: [PATCH] add back total timeout --- selfdrive/car/isotp_parallel_query.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/isotp_parallel_query.py b/selfdrive/car/isotp_parallel_query.py index 2fc0f1752f..5d7d41fb08 100644 --- a/selfdrive/car/isotp_parallel_query.py +++ b/selfdrive/car/isotp_parallel_query.py @@ -72,7 +72,7 @@ class IsoTpParallelQuery: messaging.drain_sock(self.logcan) self.msg_buffer = defaultdict(list) - def get_data(self, timeout): + def get_data(self, timeout, total_timeout=60.): self._drain_rx() # Create message objects @@ -146,4 +146,8 @@ class IsoTpParallelQuery: cloudlog.warning(f"iso-tp query timeout after receiving response: {tx_addr}") break + if cur_time - start_time > total_timeout: + cloudlog.warning("iso-tp query timeout while receiving data") + break + return results