mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
fix: load order bug
This commit is contained in:
@@ -42,13 +42,12 @@ export function spawnShards(gateway: GatewayManager, firstShardId = 0) {
|
||||
for (const [workerId, ...queue] of bucket.workers) {
|
||||
gateway.debug(`3. Running for of loop in spawnShards function.`);
|
||||
|
||||
queue.forEach((shardId) => {
|
||||
for (const shardId of queue) {
|
||||
bucket.createNextShard.push(async () => {
|
||||
await gateway.tellWorkerToIdentify(gateway, workerId, shardId, bucketId);
|
||||
});
|
||||
});
|
||||
|
||||
await bucket.createNextShard.shift()?.();
|
||||
}
|
||||
}
|
||||
await bucket.createNextShard.shift()?.();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user