aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-06-10 07:32:05 -0400
committerRapptz <[email protected]>2021-06-10 07:32:05 -0400
commit11e23c534af5a0fa9e79ac4c521d7999d3dd3336 (patch)
tree034228c2e12ba3e295d25ea8de6582dbdb487848 /discord/client.py
parentNone check in InteractionResponse.edit_message (diff)
downloaddiscord.py-11e23c534af5a0fa9e79ac4c521d7999d3dd3336.tar.xz
discord.py-11e23c534af5a0fa9e79ac4c521d7999d3dd3336.zip
Close ClientSession after closing websocket connections
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 27ec55c1..4f53c15e 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -527,7 +527,6 @@ class Client:
if self._closed:
return
- await self.http.close()
self._closed = True
for voice in self.voice_clients:
@@ -540,6 +539,7 @@ class Client:
if self.ws is not None and self.ws.open:
await self.ws.close(code=1000)
+ await self.http.close()
self._ready.clear()
def clear(self):