Skip to content

Commit

Permalink
mavproxy.py: exit logging thread if cltr-c exit flag is set
Browse files Browse the repository at this point in the history
may prevent an odd threading exception in Python
  • Loading branch information
peterbarker committed Jun 5, 2024
1 parent 9768765 commit b42127e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MAVProxy/mavproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ def mkdir_p(dir):

def log_writer():
'''log writing thread'''
while True:
while not mpstate.status.exit:
mpstate.logfile_raw.write(bytearray(mpstate.logqueue_raw.get()))
timeout = time.time() + 10
while not mpstate.logqueue_raw.empty() and time.time() < timeout:
Expand Down

0 comments on commit b42127e

Please sign in to comment.