1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-11-25 02:01:28 +00:00

Aggregate shard closing futures instead of doing them sequentially.

This commit is contained in:
Rapptz
2017-03-21 03:52:24 -04:00
parent 5461bfb475
commit fd62c8a4f1

@@ -236,9 +236,8 @@ class AutoShardedClient(Client):
self._closed.set()
for shard in self.shards.values():
yield from shard.ws.close()
to_close = [shard.ws.close() for shard in self.shards.values()]
yield from asyncio.wait(to_close, loop=self.loop)
yield from self.http.close()
@asyncio.coroutine