docs: enhance some methods documentation
[poolifier.git] / src / worker / abstract-worker.ts
index 1f42a90bcf073e514a0acf2eec4fa4f04fdb0aea..0ea3fa6253103292775550bfb2d13fa329f19079 100644 (file)
@@ -98,7 +98,7 @@ export abstract class AbstractWorker<
       this.mainWorker = value.parent
     } else if (value.kill !== undefined) {
       // Here is time to kill this worker, just clearing the interval
-      if (this.aliveInterval != null) clearInterval(this.aliveInterval)
+      this.aliveInterval != null && clearInterval(this.aliveInterval)
       this.emitDestroy()
     }
   }