mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-06 17:29:03 +00:00
Close websocket when reconnecting websocket during polling
Close #10409
This commit is contained in:
1 parent
7f9c3b1b40
commit
198549822e
1 file changed
+1
@@ -654,6 +654,7 @@ class DiscordWebSocket:
|
||||
self._keep_alive.stop()
|
||||
self._keep_alive = None
|
||||
|
||||
await self.socket.close(code=4000)
|
||||
if isinstance(e, asyncio.TimeoutError):
|
||||
_log.debug('Timed out receiving packet. Attempting a reconnect.')
|
||||
raise ReconnectWebSocket(self.shard_id) from None
|
||||
|
||||
Reference in new issue
Block a user