Fix eslint configuration
[poolifier.git] / src / pools / abstract-pool.ts
index f3a8c1c6c9a7bb0a730b6b3b10dcd9a766b64e5e..5efecb58209d3b07e3f1d6cc25cfec0e71fc3281 100644 (file)
@@ -189,14 +189,14 @@ export abstract class AbstractPool<
       this,
       () => {
         const workerCreated = this.createAndSetupWorker()
-        this.registerWorkerMessageListener(workerCreated, async message => {
+        this.registerWorkerMessageListener(workerCreated, message => {
           const tasksInProgress = this.tasks.get(workerCreated)
           if (
             isKillBehavior(KillBehaviors.HARD, message.kill) ||
             tasksInProgress === 0
           ) {
             // Kill received from the worker, means that no new tasks are submitted to that worker for a while ( > maxInactiveTime)
-            await this.destroyWorker(workerCreated)
+            this.destroyWorker(workerCreated) as void
           }
         })
         return workerCreated