From: Jérôme Benoit Date: Sat, 6 Feb 2021 13:18:57 +0000 (+0100) Subject: Logic fixlet to the control flow. X-Git-Tag: v1.0.1-0~104^2~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=967511dc5ba15e74610c2b48996b7e7c279b01cb;p=e-mobility-charging-stations-simulator.git Logic fixlet to the control flow. Signed-off-by: Jérôme Benoit --- 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; }