mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-25 10:32:59 +00:00
Close the ClientSession in __del__.
This commit is contained in:
@@ -125,6 +125,10 @@ class Client:
|
|||||||
self._voice_data_found = asyncio.Event(loop=self.loop)
|
self._voice_data_found = asyncio.Event(loop=self.loop)
|
||||||
self._session_id_found = asyncio.Event(loop=self.loop)
|
self._session_id_found = asyncio.Event(loop=self.loop)
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
if hasattr(self, 'session'):
|
||||||
|
self.session.close()
|
||||||
|
|
||||||
# internals
|
# internals
|
||||||
|
|
||||||
def handle_message(self, message):
|
def handle_message(self, message):
|
||||||
|
|||||||
Reference in New Issue
Block a user