From b8f3418c31a95b3b90a88ce07a34c9046a376fc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 10 Mar 2023 21:24:41 +0100 Subject: [PATCH] fix: initialize attribute in the constructor MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../selection-strategies/abstract-worker-choice-strategy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 314c13c0..ebe74dcb 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -19,7 +19,7 @@ export abstract class AbstractWorkerChoiceStrategy< Response > implements IWorkerChoiceStrategy { /** {@inheritDoc} */ - public readonly isDynamicPool: boolean = this.pool.type === PoolType.DYNAMIC + public readonly isDynamicPool: boolean /** {@inheritDoc} */ public requiredStatistics: RequiredStatistics = { runTime: false @@ -32,7 +32,9 @@ export abstract class AbstractWorkerChoiceStrategy< */ public constructor ( protected readonly pool: IPoolInternal - ) {} + ) { + this.isDynamicPool = this.pool.type === PoolType.DYNAMIC + } /** {@inheritDoc} */ public abstract reset (): boolean -- 2.34.1