From 8ea697554e82d9f2854acee9fddb8d2fe2d8f9c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 13 Oct 2023 21:43:48 +0200 Subject: [PATCH] fix: remove wrong bound for event handlers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index ba87b704..a0fc76c3 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1366,13 +1366,13 @@ export abstract class AbstractPool< if (this.opts.tasksQueueOptions?.taskStealing === true) { this.workerNodes[workerNodeKey].addEventListener( 'emptyqueue', - this.handleEmptyQueueEvent.bind(this) + this.handleEmptyQueueEvent ) } if (this.opts.tasksQueueOptions?.tasksStealingOnBackPressure === true) { this.workerNodes[workerNodeKey].addEventListener( 'backpressure', - this.handleBackPressureEvent.bind(this) + this.handleBackPressureEvent ) } } -- 2.34.1