Skip to content

Commit a552d30

Browse files
committed
fix: weird edgecase
1 parent 052c49f commit a552d30

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/ws/src/ws/WebSocketManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,9 @@ export class WebSocketManager extends AsyncEventEmitter<ManagerShardEventsMap> i
333333
}
334334

335335
this.#gatewayInformation = options.gatewayInformation;
336-
337336
const shardIds = this.getShardIds();
338-
339337
if (options.gatewayInformation.session_start_limit.remaining < shardIds.length) {
338+
this.#gatewayInformation = null;
340339
throw new Error(
341340
`Not enough sessions remaining to spawn ${shardIds.length} shards; only ${
342341
options.gatewayInformation.session_start_limit.remaining

0 commit comments

Comments
 (0)