fix: use ws.maxShards

This commit is contained in:
ITOH
2021-05-08 17:53:36 +02:00
parent 123458859d
commit 103d3d3b3e

View File

@@ -76,7 +76,7 @@ function loaded(shardId: number) {
shard.ready = true;
// If it is the last shard we can go full ready
if (shardId === ws.lastShardId - 1) {
if (shardId === ws.maxShards - 1) {
// Still some shards are loading so wait another 2 seconds for them
if (ws.shards.some((shard) => !shard.ready)) {
setTimeout(() => {