mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-25 07:52:03 +08:00
IsoTpParallelQuery: break earlier and add comment (#27883)
* better ordering and comments * one comment one dream
This commit is contained in:
@@ -100,9 +100,6 @@ class IsoTpParallelQuery:
|
||||
while True:
|
||||
self.rx()
|
||||
|
||||
if all(request_done.values()):
|
||||
break
|
||||
|
||||
for tx_addr, msg in msgs.items():
|
||||
try:
|
||||
dat, rx_in_progress = msg.recv()
|
||||
@@ -140,6 +137,10 @@ class IsoTpParallelQuery:
|
||||
request_done[tx_addr] = True
|
||||
cloudlog.error(f"iso-tp query bad response: {tx_addr} - 0x{dat.hex()}")
|
||||
|
||||
# Break if all requests are done, we've timed out on all requests, or we've hit a max total timeout
|
||||
if all(request_done.values()):
|
||||
break
|
||||
|
||||
cur_time = time.monotonic()
|
||||
if cur_time - max(response_timeouts.values()) > 0:
|
||||
for tx_addr in msgs:
|
||||
|
||||
Reference in New Issue
Block a user