From: Jérôme Benoit Date: Sun, 6 Aug 2023 10:40:22 +0000 (+0200) Subject: refactor: unflag worker startup at the right time on worker set X-Git-Tag: v1.2.20~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3fb26594ef01e3f443bcc0bbf81401c6e38fdc01;p=e-mobility-charging-stations-simulator.git refactor: unflag worker startup at the right time on worker set Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 12f29294..39e8eca3 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -141,9 +141,9 @@ export class WorkerSet extends WorkerAbstract { worker.once('exit', () => this.removeWorkerSetElement(this.getWorkerSetElementByWorker(worker)!), ); - this.workerStartup = false; const workerSetElement: WorkerSetElement = { worker, numberOfWorkerElements: 0 }; this.workerSet.add(workerSetElement); + this.workerStartup = false; return workerSetElement; }