Strict boolean check
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 11 Oct 2022 19:14:30 +0000 (21:14 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 11 Oct 2022 19:14:30 +0000 (21:14 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/abstract-worker.ts

index 349940faea20418b2bfa954561f7d258cc8ce3b2..9b170330fabe7ea7514733b4553aac535a2528c8 100644 (file)
@@ -65,7 +65,7 @@ export abstract class AbstractWorker<
     this.checkWorkerOptions(this.opts)
     this.lastTaskTimestamp = Date.now()
     // Keep the worker active
-    if (!isMain) {
+    if (isMain === false) {
       this.aliveInterval = setInterval(
         this.checkAlive.bind(this),
         (this.opts.maxInactiveTime ?? DEFAULT_MAX_INACTIVE_TIME) / 2