From 403651a1440260cb46f42d68a82ee35e193a350d Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 4 Apr 2020 01:42:08 -0400 Subject: Change default close code to 4000 instead of 1000. This prevents our sessions from being invalidated by Discord which caused a lot of failures when resuming. This caused an unnecessary amount of IDENTIFYs to happen depending on the circumstances. Closes #2631 See also discord/discord-api-docs#1472 --- discord/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discord/client.py') diff --git a/discord/client.py b/discord/client.py index e0f74192..3b68f39b 100644 --- a/discord/client.py +++ b/discord/client.py @@ -549,7 +549,7 @@ class Client: pass if self.ws is not None and self.ws.open: - await self.ws.close() + await self.ws.close(code=1000) self._ready.clear() -- cgit v1.2.3