mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 09:57:40 +03:00
plugins/edsm: should_send() == True for any Shutdown event
We MUST attempt flushing pending events in case of commander change.
This commit is contained in:
parent
ba7c2de593
commit
26115a14f0
@ -760,6 +760,13 @@ def should_send(entries: List[Mapping[str, Any]]) -> bool: # noqa: CCR001
|
|||||||
:param entries: The entries to check
|
:param entries: The entries to check
|
||||||
:return: bool indicating whether or not to send said entries
|
:return: bool indicating whether or not to send said entries
|
||||||
"""
|
"""
|
||||||
|
# We MUST flush pending on logout, in case new login is a different Commander
|
||||||
|
if any(e for e in entries if e['event'] == 'Shutdown'):
|
||||||
|
if 'edsm-cmdr-events' in trace_on:
|
||||||
|
logger.trace('True because Shutdown')
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
# batch up burst of Scan events after NavBeaconScan
|
# batch up burst of Scan events after NavBeaconScan
|
||||||
if this.navbeaconscan:
|
if this.navbeaconscan:
|
||||||
if entries and entries[-1]['event'] == 'Scan':
|
if entries and entries[-1]['event'] == 'Scan':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user