fix: fix dynamic pool with minimum # of workers set to zero
[poolifier.git] / src / pools / thread / dynamic.ts
index fde371048c5755c77736c6a25545fe19aa90df8d..8e795512694aa41a2ea82b9c727e3ebd348b01c9 100644 (file)
@@ -40,10 +40,7 @@ export class DynamicThreadPool<
 
   /** @inheritDoc */
   protected shallCreateDynamicWorker (): boolean {
-    return (
-      (!this.full && this.internalBusy()) ||
-      (this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0)
-    )
+    return (!this.full && this.internalBusy()) || this.empty
   }
 
   /** @inheritDoc */