From: Jérôme Benoit Date: Mon, 1 Apr 2024 19:37:48 +0000 (+0200) Subject: fix: fix worker node recreation race condition X-Git-Tag: v3.1.29~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3d72059619c102a9453964b73ff24726aa6367e2;p=poolifier.git fix: fix worker node recreation race condition Signed-off-by: Jérôme Benoit --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e78fda..c4b7f9b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fix possible race condition at worker node recreation on worker `error` and `exit` events. + ## [3.1.28] - 2024-04-01 ### Fixed diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 0cec96ab..5c153087 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1252,7 +1252,7 @@ export abstract class AbstractPool< if (workerNode.info.dynamic) { this.createAndSetupDynamicWorkerNode() } else { - this.createAndSetupWorkerNode() + this.startMinimumNumberOfWorkers() } } if (