Beremiz_service.py
branchfix_PLC_runtime_shutdown
changeset 2601 9c5b20dc2b2e
parent 2600 0e20a0d48fae
child 2644 769fefae7c81
child 2649 db68cb0e6bdc
equal deleted inserted replaced
2600:0e20a0d48fae 2601:9c5b20dc2b2e
   580         runtime.GetPLCObjectSingleton().AutoLoad, autostart)
   580         runtime.GetPLCObjectSingleton().AutoLoad, autostart)
   581 except KeyboardInterrupt:
   581 except KeyboardInterrupt:
   582     pass
   582     pass
   583 
   583 
   584 pyroserver.Quit()
   584 pyroserver.Quit()
       
   585 pyro_thread.join()
   585 
   586 
   586 plcobj = runtime.GetPLCObjectSingleton()
   587 plcobj = runtime.GetPLCObjectSingleton()
   587 plcobj.StopPLC()
   588 plcobj.StopPLC()
   588 plcobj.UnLoadPLC()
   589 plcobj.UnLoadPLC()
   589 
   590 
   590 if havetwisted:
   591 if havetwisted:
   591     reactor.stop()
   592     reactor.stop()
       
   593     ui_thread.join()
   592 elif havewx:
   594 elif havewx:
   593     app.ExitMainLoop()
   595     app.ExitMainLoop()
       
   596     ui_thread.join()
   594 
   597 
   595 sys.exit(0)
   598 sys.exit(0)