refactor: code cleanup
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 1 Jan 2024 20:48:21 +0000 (21:48 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 1 Jan 2024 20:48:21 +0000 (21:48 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/pools/abstract-pool.ts

index 4720e8b4354fd5efa5245f8381a0bab023d0fbfb..8e32218dfd521567663a27b09db1b2747d74b582 100644 (file)
@@ -1702,8 +1702,8 @@ export abstract class AbstractPool<
     workerNode.info.ready = ready
     workerNode.info.taskFunctionNames = taskFunctionNames
     if (!this.readyEventEmitted && this.ready) {
-      this.readyEventEmitted = true
       this.emitter?.emit(PoolEvents.ready, this.info)
+      this.readyEventEmitted = true
     }
   }