mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Fix READY not firing for multi-processed AutoShardedClient clusters
This commit is contained in:
parent
058a1e608b
commit
9c7ae6b9dc
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user