aboutsummaryrefslogtreecommitdiff
path: root/discord/shard.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-03-21 03:32:09 -0400
committerRapptz <[email protected]>2017-03-21 03:32:09 -0400
commit5461bfb4752dad1c0b9d9792c4993bac1f0105af (patch)
treea3d6d99e8a31ccb6d0ed4f528deb731269bd9bf4 /discord/shard.py
parentEventual consistency fixes. (diff)
downloaddiscord.py-5461bfb4752dad1c0b9d9792c4993bac1f0105af.tar.xz
discord.py-5461bfb4752dad1c0b9d9792c4993bac1f0105af.zip
Check if we're closed before attempting to do a reconnect.
Diffstat (limited to 'discord/shard.py')
-rw-r--r--discord/shard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/shard.py b/discord/shard.py
index ab0ca31f..8fad51e9 100644
--- a/discord/shard.py
+++ b/discord/shard.py
@@ -234,11 +234,12 @@ class AutoShardedClient(Client):
if self.is_closed():
return
+ self._closed.set()
+
for shard in self.shards.values():
yield from shard.ws.close()
yield from self.http.close()
- self._closed.set()
@asyncio.coroutine
def change_presence(self, *, game=None, status=None, afk=False, shard_id=None):