fix: concurrency typo thx giveawayboat <3

This commit is contained in:
Skillz4Killz
2022-03-15 02:45:07 +00:00
committed by GitHub
parent a0a1554756
commit d62a5b71b1
5 changed files with 22 additions and 5 deletions
+2 -5
View File
@@ -38,12 +38,9 @@ export async function resharder(
gateway.sessionStartLimitResetAfter = results.sessionStartLimit.resetAfter;
gateway.maxConcurrency = results.sessionStartLimit.maxConcurrency;
// If more than 100K servers, begin switching to 16x sharding
if (gateway.maxShards > 60 && gateway.useOptimalLargeBotSharding) {
if (gateway.useOptimalLargeBotSharding) {
gateway.debug("[Resharding] Using optimal large bot sharding solution.");
gateway.maxShards = Math.ceil(
gateway.maxShards /
(results.sessionStartLimit.maxConcurrency === 1 ? 16 : results.sessionStartLimit.maxConcurrency),
);
gateway.maxShards = gateway.calculateMaxShards(gateway.maxShards, results.sessionStartLimit.maxConcurrency);
}
gateway.spawnShards(gateway, gateway.firstShardId);