fix: only sync worker choice strategies if needed
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Apr 2024 19:49:38 +0000 (21:49 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Apr 2024 19:49:38 +0000 (21:49 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/abstract-pool.ts

index 52829c28163637f97947343b88aab983ab1a101f..9a7199ec86da23415f976435900a8138c888afc7 100644 (file)
@@ -551,7 +551,7 @@ export abstract class AbstractPool<
     let requireSync = false
     checkValidWorkerChoiceStrategy(workerChoiceStrategy)
     if (workerChoiceStrategyOptions != null) {
-      requireSync = this.setWorkerChoiceStrategyOptions(
+      requireSync = !this.setWorkerChoiceStrategyOptions(
         workerChoiceStrategyOptions
       )
     }