diff options
| author | Rapptz <[email protected]> | 2017-03-24 20:40:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-03-24 20:40:23 -0400 |
| commit | 4160cd7d12f54337d66f5d2994c3b7c537fbf054 (patch) | |
| tree | 82f62c56dcadfb0a6c8be2151de32d2e46216646 | |
| parent | More robust cleanup for Client.run. (diff) | |
| download | discord.py-4160cd7d12f54337d66f5d2994c3b7c537fbf054.tar.xz discord.py-4160cd7d12f54337d66f5d2994c3b7c537fbf054.zip | |
Set closed state before actually finishing cleaning up.
| -rw-r--r-- | discord/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index 12fbe6e6..f00824ec 100644 --- a/discord/client.py +++ b/discord/client.py @@ -425,6 +425,8 @@ class Client: if self.is_closed(): return + self._closed.set() + for voice in list(self.voice_clients): try: yield from voice.disconnect() @@ -439,7 +441,6 @@ class Client: yield from self.http.close() - self._closed.set() self._ready.clear() @asyncio.coroutine |