From ae3a41a14998703948ee01108e346f91f7f33e48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 20 Sep 2023 19:27:43 +0200 Subject: [PATCH] fix(simulator): register worker_threads exit handler once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/worker/WorkerSet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 82e2e836..7f140527 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -86,7 +86,7 @@ export class WorkerSet extends WorkerAbstract { for (const workerSetElement of this.workerSet) { const worker = workerSetElement.worker; const waitWorkerExit = new Promise((resolve) => { - worker.on('exit', () => { + worker.once('exit', () => { resolve(); }); }); -- 2.34.1