Bump waiting time of GUILD_CREATE stream by number of shards waited.

2 seconds might be too short and cause it to finish waiting while other
shards are still IDENTIFYing.
This commit is contained in:
Rapptz
2020-01-28 23:56:46 -05:00
parent 8767c478ed
commit 5c7df3d943
2 changed files with 4 additions and 2 deletions

View File

@ -251,6 +251,7 @@ class AutoShardedClient(Client):
self._connection.shard_count = self.shard_count
shard_ids = self.shard_ids if self.shard_ids else range(self.shard_count)
self._connection.shard_ids = shard_ids
for shard_id in shard_ids:
await self.launch_shard(gateway, shard_id)