diff options
| author | Rapptz <[email protected]> | 2020-08-06 09:25:01 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-08-06 09:25:01 -0400 |
| commit | 5dd8e372e4a5aa3749d85f8fd2f7eb4d779512cb (patch) | |
| tree | 0a0a8cacedb4a702b651efcd7d3cacc80b3a6767 | |
| parent | Version bump to 1.4 (diff) | |
| download | discord.py-5dd8e372e4a5aa3749d85f8fd2f7eb4d779512cb.tar.xz discord.py-5dd8e372e4a5aa3749d85f8fd2f7eb4d779512cb.zip | |
Terminate connection if a close code couldn't be handled
| -rw-r--r-- | discord/gateway.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/gateway.py b/discord/gateway.py index 6fde1a97..a4a39186 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -522,7 +522,7 @@ class DiscordWebSocket: if self._can_handle_close(): log.info('Websocket closed with %s, attempting a reconnect.', code) raise ReconnectWebSocket(self.shard_id) from None - elif self.socket.close_code is not None: + else: log.info('Websocket closed with %s, cannot reconnect.', code) raise ConnectionClosed(self.socket, shard_id=self.shard_id, code=code) from None |