From af8e02ca9a957f78366251dd2e2b818c7b398dd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 2 Feb 2023 21:39:53 +0100 Subject: [PATCH] refactor(simulator): remove unneeded duplicate initialization at startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/Bootstrap.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index b1495243..7a823e56 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -49,17 +49,16 @@ export class Bootstrap { private readonly workerScript: string; private constructor() { - this.started = false; - this.workerImplementation = null; // Enable unconditionally for now this.logUnhandledRejection(); this.logUncaughtException(); + this.started = false; + this.workerImplementation = null; this.workerScript = path.join( path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'), 'charging-station', `ChargingStationWorker${path.extname(fileURLToPath(import.meta.url))}` ); - this.initializeCounters(); Configuration.getUIServer().enabled === true && (this.uiServer = UIServerFactory.getUIServerImplementation(Configuration.getUIServer())); Configuration.getPerformanceStorage().enabled === true && @@ -145,8 +144,6 @@ export class Bootstrap { public async restart(): Promise { await this.stop(); - this.initializeCounters(); - this.initializeWorkerImplementation(); await this.start(); } -- 2.34.1