From 967511dc5ba15e74610c2b48996b7e7c279b01cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 6 Feb 2021 14:18:57 +0100 Subject: [PATCH] Logic fixlet to the control flow. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index bf776f9e..8c6d415a 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -64,8 +64,8 @@ export default class Bootstrap { public async stop(): Promise { if (isMainThread && this.started) { - await this.getWorkerImplementationInstance().stop(); if (this.getWorkerImplementationInstance()) { + await this.getWorkerImplementationInstance().stop(); // Nullify to force worker implementation instance creation this.workerImplementationInstance = null; } -- 2.34.1