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