From 103d3d3b3e28feee5a1aed1684a32110fd07ff5a Mon Sep 17 00:00:00 2001 From: ITOH Date: Sat, 8 May 2021 17:53:36 +0200 Subject: [PATCH] fix: use ws.maxShards --- src/handlers/misc/READY.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/misc/READY.ts b/src/handlers/misc/READY.ts index 56188fdd7..a36da53b6 100644 --- a/src/handlers/misc/READY.ts +++ b/src/handlers/misc/READY.ts @@ -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(() => {