diff options
| author | Rapptz <[email protected]> | 2020-04-10 07:05:41 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-07-25 09:59:38 -0400 |
| commit | 9c7ae6b9dce8444503a237e8dfbf85f2fd7f9d2f (patch) | |
| tree | a6cf982e4253b1b494780af63d6f1da3f8586446 | |
| parent | Fix voice websocket connections (diff) | |
| download | discord.py-9c7ae6b9dce8444503a237e8dfbf85f2fd7f9d2f.tar.xz discord.py-9c7ae6b9dce8444503a237e8dfbf85f2fd7f9d2f.zip | |
Fix READY not firing for multi-processed AutoShardedClient clusters
| -rw-r--r-- | discord/shard.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/discord/shard.py b/discord/shard.py index 0f63b65c..d96ad071 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -221,9 +221,6 @@ class AutoShardedClient(Client): self.shards[shard_id] = ret = Shard(ws, self) ret.launch() - if len(self.shards) == self.shard_count: - self._connection.shards_launched.set() - async def launch_shards(self): if self.shard_count is None: self.shard_count, gateway = await self.http.get_bot_gateway() @@ -241,6 +238,8 @@ class AutoShardedClient(Client): if shard_id != last_shard_id: await asyncio.sleep(5.0) + self._connection.shards_launched.set() + async def _connect(self): await self.launch_shards() |