fix: fix worker choice strategy options default value
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:58:55 +0000 (14:58 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:58:55 +0000 (14:58 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/abstract-worker-choice-strategy.ts

index 859ead823bc233c6e251eb004e7d6fb0563459e6..6a9cff236a2def16eee80786e869e795d774f586 100644 (file)
@@ -64,6 +64,7 @@ export abstract class AbstractWorkerChoiceStrategy<
 
   /** @inheritDoc */
   public setOptions (opts: WorkerChoiceStrategyOptions): void {
+    opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
     this.checkOptions(opts)
     this.opts = opts
   }