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
This commit is contained in:
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user