Skip to content

Commit

Permalink
shut down on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Jan 17, 2022
1 parent 9ee29de commit 616cd5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion selfdrive/thermald/thermald.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ def main():
try:
while True:
time.sleep(1)
except (KeyboardInterrupt, SystemExit):
if not all(t.is_alive() for t in threads):
break
finally:
end_event.set()

for t in threads:
Expand Down

0 comments on commit 616cd5b

Please sign in to comment.