Beremiz_service.py
branchfix_PLC_runtime_shutdown
changeset 2601 9c5b20dc2b2e
parent 2600 0e20a0d48fae
child 2644 769fefae7c81
child 2649 db68cb0e6bdc
--- a/Beremiz_service.py	Wed Apr 17 14:18:22 2019 +0200
+++ b/Beremiz_service.py	Thu Apr 18 14:29:55 2019 +0200
@@ -582,6 +582,7 @@
     pass
 
 pyroserver.Quit()
+pyro_thread.join()
 
 plcobj = runtime.GetPLCObjectSingleton()
 plcobj.StopPLC()
@@ -589,7 +590,9 @@
 
 if havetwisted:
     reactor.stop()
+    ui_thread.join()
 elif havewx:
     app.ExitMainLoop()
+    ui_thread.join()
 
 sys.exit(0)