From 37d821df9ba9212fec91de9992f37aea93b661b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 8 May 2024 23:36:23 +0200 Subject: [PATCH] fix: guard worker node back pressure flag change MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/worker-node.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index 88c6e8d1..c1c1e0a9 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -90,8 +90,8 @@ export class WorkerNode this.setBackPressureFlag = true this.info.backPressure = true this.emit('backPressure', { workerId: this.info.id }) + this.setBackPressureFlag = false } - this.setBackPressureFlag = false return tasksQueueSize } @@ -105,8 +105,8 @@ export class WorkerNode ) { this.setBackPressureFlag = true this.info.backPressure = false + this.setBackPressureFlag = false } - this.setBackPressureFlag = false return task } -- 2.34.1