Browse Source

Fix RESUME handling and make sure to wait 5 seconds before attempting.

pull/503/merge
Rapptz 8 years ago
parent
commit
a76909e182
  1. 6
      discord/gateway.py

6
discord/gateway.py

@ -347,12 +347,14 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
return
if op == self.INVALIDATE_SESSION:
state.sequence = None
state.session_id = None
if data == True:
yield from asyncio.sleep(5.0, loop=self.loop)
yield from self.close()
raise ResumeWebSocket()
state.sequence = None
state.session_id = None
yield from self.identify()
return

Loading…
Cancel
Save