aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-04-22 21:34:56 -0400
committerRapptz <[email protected]>2017-04-22 21:34:56 -0400
commite445fa933503201488cab93265a6fa66a19a1dc0 (patch)
tree80be734cb17d92a467467c0c95e6dedcf1b765bc
parentFix some linting errors. (diff)
downloaddiscord.py-e445fa933503201488cab93265a6fa66a19a1dc0.tar.xz
discord.py-e445fa933503201488cab93265a6fa66a19a1dc0.zip
Wait 5 seconds before attempting to RESUME during INVALIDATE_SESSION.
-rw-r--r--discord/gateway.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/discord/gateway.py b/discord/gateway.py
index 1da6a818..95749f0b 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -337,6 +337,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
if op == self.INVALIDATE_SESSION:
if data == True:
+ yield from asyncio.sleep(5.0, loop=self.loop)
yield from self.close()
raise ResumeWebSocket(self.shard_id)