1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

plugins/edsm: Empty pending on Shutdown &

This commit is contained in:
Athanasius 2021-08-05 15:19:43 +01:00
parent 26115a14f0
commit 53da204ffd
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -746,6 +746,12 @@ def worker() -> None: # noqa: CCR001 C901 # Cant be broken up currently
# LANG: EDSM Plugin - Error connecting to EDSM API
plug.show_error(_("Error: Can't connect to EDSM"))
if entry['event'].lower() == 'shutdown':
# Game shutdown so we MUST not hang on to pending
pending = []
if 'edsm-cmdr-events' in trace_on:
logger.trace('Blanked pending because of shutdown event')
if closing:
logger.debug('closing, so returning.')
return