aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-04-08 07:43:55 -0400
committerRapptz <[email protected]>2019-04-08 07:45:05 -0400
commit61ee88b0fc48ba2bfc479bccec0e99a92c05fa1d (patch)
treed98847fb17a444a2231077f4c0c849421591026d /discord/client.py
parentFix long-standing issue with user updates not dispatching properly. (diff)
downloaddiscord.py-61ee88b0fc48ba2bfc479bccec0e99a92c05fa1d.tar.xz
discord.py-61ee88b0fc48ba2bfc479bccec0e99a92c05fa1d.zip
Fix oversight where on_disconnect did not get called on WS termination.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index 2817ecc0..7ae87a4e 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -382,6 +382,7 @@ class Client:
await self.ws.poll_event()
except ResumeWebSocket:
log.info('Got a request to RESUME the websocket.')
+ self.dispatch('disconnect')
coro = DiscordWebSocket.from_client(self, shard_id=self.shard_id, session=self.ws.session_id,
sequence=self.ws.sequence, resume=True)
self.ws = await asyncio.wait_for(coro, timeout=180.0, loop=self.loop)