feat: restart worker in case of uncaught error
[poolifier.git] / src / worker / abstract-worker.ts
index 2afd6f3486a1103347a258c575cece7773e3c4d3..8a38b4e576464ecb88078540cc8604d7b3ad323f 100644 (file)
@@ -71,10 +71,7 @@ export abstract class AbstractWorker<
     super(type)
     this.checkWorkerOptions(this.opts)
     this.checkTaskFunctions(taskFunctions)
-    if (
-      !this.isMain &&
-      (this.opts.maxInactiveTime ?? DEFAULT_MAX_INACTIVE_TIME) > 0
-    ) {
+    if (!this.isMain) {
       this.lastTaskTimestamp = performance.now()
       this.aliveInterval = setInterval(
         this.checkAlive.bind(this),