mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 15:57:14 +03:00
plugins/edsm: Only try to send if pending isn't empty
This prevents literally sending an empty data to EDSM if we trigger sending due to Shutdown.
This commit is contained in:
parent
f2d7f6a5df
commit
64f97accc0
@ -643,7 +643,7 @@ def worker() -> None: # noqa: CCR001 C901 # Cant be broken up currently
|
||||
|
||||
pending.append(entry)
|
||||
|
||||
if should_send(pending, entry['event']):
|
||||
if pending and should_send(pending, entry['event']):
|
||||
if 'edsm-cmdr-events' in trace_on:
|
||||
logger.trace(f'({cmdr=}, {entry["event"]=}): should_send() said True')
|
||||
pendings = [f"{p}\n" for p in pending]
|
||||
|
Loading…
x
Reference in New Issue
Block a user