mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 01:22:19 +03:00
Shutdown: re-order the top level calls
1. The updater is in a thread/DLL and we don't want that firing part way through shutdown, so it gets asked to stop first. 2. Then plugins, so they're out of the way and we won't have already stopped something they might rely on. 3. Hotkey after that to head off the user triggering something via them. 4. Now stop the programmatic input from Journal files (including Status.json). 5. Frontier auth handling. 6. And then anything else.
This commit is contained in:
parent
590cd608d3
commit
e51bde44ef
@ -1069,27 +1069,36 @@ class AppWindow(object):
|
||||
self.w.update_idletasks()
|
||||
logger.info('Starting shutdown procedures...')
|
||||
|
||||
logger.info('Closing protocol handler...')
|
||||
protocolhandler.close()
|
||||
# First so it doesn't interrupt us
|
||||
logger.info('Closing update checker...')
|
||||
self.updater.close()
|
||||
|
||||
# Earlier than anything else so plugin code can't interfere *and* it
|
||||
# won't still be running in a manner that might rely on something
|
||||
# we'd otherwise have already stopped.
|
||||
logger.info('Notifying plugins to stop...')
|
||||
plug.notify_stop()
|
||||
|
||||
# Handling of application hotkeys now so the user can't possible cause
|
||||
# an issue via triggering one.
|
||||
logger.info('Unregistering hotkey manager...')
|
||||
hotkeymgr.unregister()
|
||||
|
||||
# Now the main programmatic input methods
|
||||
logger.info('Closing dashboard...')
|
||||
dashboard.close()
|
||||
|
||||
logger.info('Closing journal monitor...')
|
||||
monitor.close()
|
||||
|
||||
logger.info('Notifying plugins to stop...')
|
||||
plug.notify_stop()
|
||||
|
||||
logger.info('Closing update checker...')
|
||||
self.updater.close()
|
||||
# Frontier auth/CAPI handling
|
||||
logger.info('Closing protocol handler...')
|
||||
protocolhandler.close()
|
||||
|
||||
logger.info('Closing Frontier CAPI sessions...')
|
||||
companion.session.close()
|
||||
|
||||
# Now anything else.
|
||||
logger.info('Closing config...')
|
||||
config.close()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user