beremiz
Clone
Summary
Browse
Changes
Graph
Ensure Beremiz_service.py quits properly when Main Worker stops and wa are using Wx and/or Twisted.
2019-04-16, Edouard Tisserant
a0d2741a6722
Parents
f1e182818434
Children
779e8dbf1ee1
Ensure Beremiz_service.py quits properly when Main Worker stops and wa are using Wx and/or Twisted.
1 files changed, 5 insertions(+), 0 deletions(-)
+5
-0
Beremiz_service.py
--- a/Beremiz_service.py Mon Apr 15 13:34:09 2019 +0200
+++ b/Beremiz_service.py Tue Apr 16 11:26:34 2019 +0200
@@ -586,4 +586,9 @@
plcobj.StopPLC()
plcobj.UnLoadPLC()
+if havetwisted:
+ reactor.stop()
+elif havewx:
+ app.ExitMainLoop()
+
sys.exit(0)