diff options
| author | Rapptz <[email protected]> | 2020-04-04 01:42:08 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-04-04 01:42:08 -0400 |
| commit | 403651a1440260cb46f42d68a82ee35e193a350d (patch) | |
| tree | bf3a942558b13669f14fdc8e717299acdaf20992 /discord/shard.py | |
| parent | Fixed missing awaits in subclassed coros (diff) | |
| download | discord.py-403651a1440260cb46f42d68a82ee35e193a350d.tar.xz discord.py-403651a1440260cb46f42d68a82ee35e193a350d.zip | |
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
Diffstat (limited to 'discord/shard.py')
| -rw-r--r-- | discord/shard.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/shard.py b/discord/shard.py index 2ea59dbc..edab0426 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -290,7 +290,7 @@ class AutoShardedClient(Client): except Exception: pass - to_close = [asyncio.ensure_future(shard.ws.close(), loop=self.loop) for shard in self.shards.values()] + to_close = [asyncio.ensure_future(shard.ws.close(code=1000), loop=self.loop) for shard in self.shards.values()] if to_close: await asyncio.wait(to_close) |