diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 45534c86..2962e13f 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1482,8 +1482,7 @@ export abstract class AbstractPool< // Kill message received from worker if ( isKillBehavior(KillBehaviors.HARD, message.kill) || - (workerUsage != null && - isKillBehavior(KillBehaviors.SOFT, message.kill) && + (isKillBehavior(KillBehaviors.SOFT, message.kill) && ((this.opts.enableTasksQueue === false && workerUsage.tasks.executing === 0) || (this.opts.enableTasksQueue === true &&