From: Jérôme Benoit Date: Fri, 13 Oct 2023 19:43:48 +0000 (+0200) Subject: fix: remove wrong bound for event handlers X-Git-Tag: v3.0.1~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8ea697554e82d9f2854acee9fddb8d2fe2d8f9c4;p=poolifier.git fix: remove wrong bound for event handlers Signed-off-by: Jérôme Benoit --- 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 ) } }