Skip to content

Commit

Permalink
Checks the close sequence of the last shard and doesn't wait if it ex…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortovoxx committed Apr 3, 2021
1 parent 5560680 commit 76f7622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ require.cache[SHMPath].exports = class WebSocketManager extends SHM {
}
}
// If we have multiple shards add a 5s delay if identifying or no delay if resuming
if (this.shardQueue.size && Object.keys(this._hotreload).length) {
if (this.shardQueue.size && this.shards.last().closeSequence) {
this.debug(`Shard Queue Size: ${this.shardQueue.size} with sessions; continuing immediately`);
return this.createShards();
} else if (this.shardQueue.size) {
Expand Down

0 comments on commit 76f7622

Please sign in to comment.