From: Jérôme Benoit Date: Wed, 21 Feb 2024 17:22:42 +0000 (+0100) Subject: fix: reset simulator state on stop/start cycle X-Git-Tag: v1.2.38~63 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9d289c632492e76934967d23a8305bf28a352a83;p=e-mobility-charging-stations-simulator.git fix: reset simulator state on stop/start cycle State save and restoration is planned for later. Until then, the configuration file is the reference at start. Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 5ee1f2c0..433b04cd 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -262,6 +262,7 @@ export class Bootstrap extends EventEmitter { delete this.workerImplementation this.removeAllListeners() this.uiServer?.chargingStations.clear() + this.initializedCounters = false await this.storage?.close() delete this.storage this.started = false @@ -278,7 +279,6 @@ export class Bootstrap extends EventEmitter { await this.stop() Configuration.getConfigurationSection(ConfigurationSection.uiServer) .enabled !== true && this.uiServer?.stop() - this.initializedCounters = false await this.start() }