From: Jérôme Benoit Date: Sun, 11 Feb 2024 18:27:38 +0000 (+0100) Subject: fix: flag worker set as stopped as soon the stopped event is emitted X-Git-Tag: v1.2.36~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=36c1166db79b6b2631b1419a6ec47415c413ac06;p=e-mobility-charging-stations-simulator.git fix: flag worker set as stopped as soon the stopped event is emitted Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index f22f1953..4a43e27b 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -97,9 +97,9 @@ export class WorkerSet extends WorkerAbstract { await waitWorkerExit } this.emitter?.emit(WorkerSetEvents.stopped, this.info) + this.started = false this.emitter?.emitDestroy() this.emitter?.removeAllListeners() - this.started = false } /** @inheritDoc */