repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: add PoolEvents/PoolEvent types
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
worker-choice-strategy-context.ts
diff --git
a/src/pools/selection-strategies/worker-choice-strategy-context.ts
b/src/pools/selection-strategies/worker-choice-strategy-context.ts
index 66aafad6bf89b0164d2fab5f89c5aca0a4bea0c5..826a89d9d6ce19c3f362f918785653c3056ba42e 100644
(file)
--- a/
src/pools/selection-strategies/worker-choice-strategy-context.ts
+++ b/
src/pools/selection-strategies/worker-choice-strategy-context.ts
@@
-89,11
+89,10
@@
export class WorkerChoiceStrategyContext<
public setWorkerChoiceStrategy (
workerChoiceStrategy: WorkerChoiceStrategy
): void {
public setWorkerChoiceStrategy (
workerChoiceStrategy: WorkerChoiceStrategy
): void {
- if (this.workerChoiceStrategyType === workerChoiceStrategy) {
- this.workerChoiceStrategies.get(workerChoiceStrategy)?.reset()
- } else {
+ if (this.workerChoiceStrategyType !== workerChoiceStrategy) {
this.workerChoiceStrategyType = workerChoiceStrategy
}
this.workerChoiceStrategyType = workerChoiceStrategy
}
+ this.workerChoiceStrategies.get(this.workerChoiceStrategyType)?.reset()
}
/**
}
/**