From d548aa5751e5bdfde8c1411c65ad114c2bcb2b2d Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Mon, 7 Sep 2020 17:55:51 +0200 Subject: [PATCH] Fix built-in webserver shutdown --- src/scriptform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scriptform.py b/src/scriptform.py index 98cf3ff..843d325 100755 --- a/src/scriptform.py +++ b/src/scriptform.py @@ -142,7 +142,8 @@ class ScriptForm(object): # We need to spawn a new thread in which the server is shut down, # because doing it from the main thread blocks, since the server is # waiting for connections.. - threading.Thread(target=t_shutdown, args=(1,)) + thread = threading.Thread(target=t_shutdown, args=(self,)) + thread.start() def main(): # pragma: no cover