X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fabstract-pool.ts;h=b72d8cbcb4c3354294dda16718a6d229e64d04e0;hb=3c9123c7bc41a8815d7371d591ae88e38637bc42;hp=c8d4551167d28d0bcf64cf3e7afb082dff53841d;hpb=4aeb640dc15908e9d2d903642da6f439baf135f3;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index c8d45511..b72d8cbc 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1224,7 +1224,6 @@ export abstract class AbstractPool< this.emitter?.emit(PoolEvents.error, error) if ( this.started && - !this.starting && !this.destroying && this.opts.restartWorkerOnError === true ) { @@ -1234,7 +1233,11 @@ export abstract class AbstractPool< this.createAndSetupWorkerNode() } } - if (this.started && this.opts.enableTasksQueue === true) { + if ( + this.started && + !this.destroying && + this.opts.enableTasksQueue === true + ) { this.redistributeQueuedTasks(this.workerNodes.indexOf(workerNode)) } workerNode?.terminate().catch(error => {