fix: remove wrong bound for event handlers
[poolifier.git] / 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
         )
       }
     }