mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-10 15:59:50 +00:00
Actually resume on opcode RECONNECT
This commit is contained in:
parent
d50acf79f8
commit
192f57efef
@ -447,9 +447,8 @@ class Client:
|
|||||||
try:
|
try:
|
||||||
yield from self.ws.poll_event()
|
yield from self.ws.poll_event()
|
||||||
except (ReconnectWebSocket, ResumeWebSocket) as e:
|
except (ReconnectWebSocket, ResumeWebSocket) as e:
|
||||||
resume = type(e) is ResumeWebSocket
|
|
||||||
log.info('Got ' + type(e).__name__)
|
log.info('Got ' + type(e).__name__)
|
||||||
self.ws = yield from DiscordWebSocket.from_client(self, resume=resume)
|
self.ws = yield from DiscordWebSocket.from_client(self, resume=True)
|
||||||
except ConnectionClosed as e:
|
except ConnectionClosed as e:
|
||||||
yield from self.close()
|
yield from self.close()
|
||||||
if e.code != 1000:
|
if e.code != 1000:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user