From: Jérôme Benoit Date: Wed, 20 Sep 2023 17:18:14 +0000 (+0200) Subject: fix: fix worker ready message handling on windows X-Git-Tag: v2.7.1~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e2898b4f0f2e355bbe65974e1789cbe0c59168ba;p=poolifier.git fix: fix worker ready message handling on windows Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index b8e4b167..311a56ad 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -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)) } }