From cf61ed4d349c97d81fb1db7bea7b96b276445678 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Thu, 31 Mar 2022 01:27:23 +0000 Subject: [PATCH] fix: use last shard id not maxShards --- gateway/resharder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/resharder.ts b/gateway/resharder.ts index 96cf1c9ed..f788a441f 100644 --- a/gateway/resharder.ts +++ b/gateway/resharder.ts @@ -88,7 +88,7 @@ export async function resharderIsPending( gateway: GatewayManager, oldGateway: GatewayManager, ) { - for (let i = gateway.firstShardId; i < gateway.maxShards; i++) { + for (let i = gateway.firstShardId; i < gateway.lastShardId; i++) { const shard = gateway.shards.get(i); if (!shard?.ready) { return true;