mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 08:17:47 +00:00
Close the ClientSession in __del__.
This commit is contained in:
parent
d3fac94e21
commit
7834236044
@ -125,6 +125,10 @@ class Client:
|
||||
self._voice_data_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
|
||||
|
||||
def handle_message(self, message):
|
||||
|
Loading…
x
Reference in New Issue
Block a user