From ec7b8edcc2933a8d68f036a17d70c7868b0d65df Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 4 Sep 2020 08:02:52 -0400 Subject: [PATCH] Add more close codes that can't be handled for reconnecting. --- discord/gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/gateway.py b/discord/gateway.py index 9a605cd6b..e7274520b 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -517,7 +517,7 @@ class DiscordWebSocket: def _can_handle_close(self): code = self._close_code or self.socket.close_code - return code not in (1000, 4004, 4010, 4011) + return code not in (1000, 4004, 4010, 4011, 4012, 4013, 4014) async def poll_event(self): """Polls for a DISPATCH event and handles the general gateway loop.