From b42127e68f54696c7337fac5e81c452903bde8c0 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 6 Jun 2024 08:52:49 +1000 Subject: [PATCH] mavproxy.py: exit logging thread if cltr-c exit flag is set may prevent an odd threading exception in Python --- MAVProxy/mavproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAVProxy/mavproxy.py b/MAVProxy/mavproxy.py index 88a3ccf9d4..958a1821ea 100644 --- a/MAVProxy/mavproxy.py +++ b/MAVProxy/mavproxy.py @@ -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: