From c82b19309a1f0ebf9c1102f2e1cb4f3883c69847 Mon Sep 17 00:00:00 2001 From: Matthew Stratford Date: Fri, 24 Sep 2021 20:26:48 +0100 Subject: [PATCH] Make sure server definitely quits with timeout. --- launch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/launch.py b/launch.py index 5e2ac64..aaeae03 100755 --- a/launch.py +++ b/launch.py @@ -35,7 +35,7 @@ def startServer(notifications=False): if server and server.is_alive(): server.terminate() - server.join() + server.join(timeout=20) # If we somehow get stuck stopping BAPSicle let it die. # Catch the handler being killed externally. except Exception as e: @@ -43,7 +43,7 @@ def startServer(notifications=False): type(e).__name__, e.args)) if server and server.is_alive(): server.terminate() - server.join() + server.join(timeout=20) def printer(msg: Any): @@ -81,3 +81,4 @@ if __name__ == "__main__": sys.exit(0) else: startServer() + sys.exit(0)