From 9d289c632492e76934967d23a8305bf28a352a83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 21 Feb 2024 18:22:42 +0100 Subject: [PATCH] fix: reset simulator state on stop/start cycle MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/charging-station/Bootstrap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() } -- 2.34.1