fix: emit pool error if continous tasks stealing on idle fail
[poolifier.git] / src / pools / abstract-pool.ts
index a9f6edd73099454681644b56693b8978cec9f81e..f14c28e9925117ae6d73a51cb09b0fe811cad3f9 100644 (file)
@@ -1603,7 +1603,9 @@ export abstract class AbstractPool<
         this.handleWorkerNodeIdleEvent(eventDetail, stolenTask)
         return undefined
       })
-      .catch(EMPTY_FUNCTION)
+      .catch(error => {
+        this.emitter?.emit(PoolEvents.error, error)
+      })
   }
 
   private readonly workerNodeStealTask = (