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