1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-12-20 16:41:13 -05:00

Ensure PacketList is initialized

This commit is contained in:
Hemna 2021-10-20 15:48:35 -04:00
parent 8ee8b149f1
commit 66c5d85b89
2 changed files with 2 additions and 1 deletions

View File

@ -477,10 +477,10 @@ def server(
plugin_manager.setup_plugins()
# Now load the msgTrack from disk if any
packets.PacketList(config=config)
if flush:
LOG.debug("Deleting saved MsgTrack.")
messaging.MsgTrack().flush()
packets.PacketList(config=config)
packets.WatchList(config=config)
packets.SeenList(config=config)
else:

View File

@ -29,6 +29,7 @@ class PacketList:
cls._instance = super().__new__(cls)
cls._instance.packet_list = utils.RingBuffer(1000)
cls._instance.lock = threading.Lock()
cls._instance.config = kwargs["config"]
return cls._instance
def __init__(self, config=None):