diff options
| author | Rapptz <[email protected]> | 2017-07-14 11:06:00 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-07-14 11:06:00 -0400 |
| commit | 2e57fa6dfd44ae9a3d7343386ea557d44eff3678 (patch) | |
| tree | a2cf10308c667b292c0b780e91f1dbe10e8333a8 | |
| parent | Expose reverse parameter in TextChannel.purge (diff) | |
| download | discord.py-2e57fa6dfd44ae9a3d7343386ea557d44eff3678.tar.xz discord.py-2e57fa6dfd44ae9a3d7343386ea557d44eff3678.zip | |
Don't re-raise in Client.connect if it's a clean close code.
| -rw-r--r-- | discord/client.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index 2c5ed69c..b338cc13 100644 --- a/discord/client.py +++ b/discord/client.py @@ -396,6 +396,9 @@ class Client: if not reconnect: yield from self.close() + if isinstance(e, ConnectionClosed) and e.code == 1000: + # clean close, don't re-raise this + return raise if self.is_closed(): |