Skip to content

Commit

Permalink
fix(worker): properly cancel blocking command during disconnections
Browse files Browse the repository at this point in the history
  • Loading branch information
manast authored and roggervalf committed May 29, 2024
1 parent 5b25660 commit d226d1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/classes/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ will never work with more accuracy than 1ms. */
// due to issues in Redis and IORedis, so we will reconnect if we
// don't get a response in the expected time.
timeout = setTimeout(async () => {
await this.blockingConnection.disconnect();
await this.blockingConnection.reconnect();
bclient.disconnect(!this.closing);
}, blockTimeout * 1000 + 1000);

this.updateDelays(); // reset delays to avoid reusing same values in next iteration
Expand Down

0 comments on commit d226d1b

Please sign in to comment.