Skip to content

Commit 76f7622

Browse files
committed
Checks the close sequence of the last shard and doesn't wait if it exists
Fixes timotejroiko#41 (comment)
1 parent 5560680 commit 76f7622

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ require.cache[SHMPath].exports = class WebSocketManager extends SHM {
159159
}
160160
}
161161
// If we have multiple shards add a 5s delay if identifying or no delay if resuming
162-
if (this.shardQueue.size && Object.keys(this._hotreload).length) {
162+
if (this.shardQueue.size && this.shards.last().closeSequence) {
163163
this.debug(`Shard Queue Size: ${this.shardQueue.size} with sessions; continuing immediately`);
164164
return this.createShards();
165165
} else if (this.shardQueue.size) {

0 commit comments

Comments
 (0)