plugins/edsm: Empty pending on Shutdown &

This commit is contained in:
Athanasius committed 2021-08-05 15:19:43 +01:00
1 parent 26115a14f0
commit 53da204ffd
1 file changed
+6
+6
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