aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/client.py2
-rw-r--r--discord/gateway.py2
-rw-r--r--discord/shard.py2
3 files changed, 3 insertions, 3 deletions
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()
diff --git a/discord/gateway.py b/discord/gateway.py
index 3561033b..0e90c5f6 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -543,7 +543,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
log.debug('Updating our voice state to %s.', payload)
await self.send_as_json(payload)
- async def close(self, code=1000, reason=''):
+ async def close(self, code=4000, reason=''):
if self._keep_alive:
self._keep_alive.stop()
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)