1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 18:07:37 +03:00

EDDN: Change EDDN.close() to call into EDDNSender.close()

This commit is contained in:
Athanasius 2022-09-29 17:04:34 +01:00 committed by Athanasius
parent c1793ad839
commit 51fb90b999
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -201,6 +201,14 @@ class EDDNSender:
return db_conn
def close(self) -> None:
"""Clean up any resources."""
if self.db:
self.db.close()
if self.db_conn:
self.db_conn.close()
def add_message(self, cmdr, msg) -> int:
"""
Add an EDDN message to the database.
@ -318,11 +326,10 @@ class EDDN:
def close(self):
"""Close down the EDDN class instance."""
logger.debug('Closing replayfile...')
if self.replayfile:
self.replayfile.close()
logger.debug('Closing Sender...')
if self.sender:
self.sender.close()
self.replayfile = None
logger.debug('Done.')
logger.debug('Closing EDDN requests.Session.')