fix: fix worker ready message handling on windows
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 20 Sep 2023 17:18:14 +0000 (19:18 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 20 Sep 2023 17:18:14 +0000 (19:18 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/worker/abstract-worker.ts

index b8e4b167602dd14306b595d0f1564b13009f636c..311a56ad60e00684835e89ef0507d60f0c9d4432 100644 (file)
@@ -100,7 +100,7 @@ export abstract class AbstractWorker<
     this.checkTaskFunctions(taskFunctions)
     this.checkWorkerOptions(this.opts)
     if (!this.isMain) {
-      this.getMainWorker().once('message', this.handleReadyMessage.bind(this))
+      this.getMainWorker().on('message', this.handleReadyMessage.bind(this))
     }
   }