fix: remove wrong bound for event handlers
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 13 Oct 2023 19:43:48 +0000 (21:43 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 13 Oct 2023 19:43:48 +0000 (21:43 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/abstract-pool.ts

index ba87b704879abb5f8171f97681fc9a9148c0059e..a0fc76c371584d3e69855fe732d720db482cc0bf 100644 (file)
@@ -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
         )
       }
     }