Unreference the worker implementation at stop
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 12 Jun 2022 22:21:20 +0000 (00:21 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 12 Jun 2022 22:21:20 +0000 (00:21 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts

index bb76c9061833e154331424f42b185b31cfda4731..af96523f1f13c3853e487a375b536a8c02a7f3b8 100644 (file)
@@ -135,6 +135,7 @@ export default class Bootstrap {
   public async stop(): Promise<void> {
     if (isMainThread && this.started) {
       await this.workerImplementation.stop();
+      this.workerImplementation = null;
       this.uiServer?.stop();
       await this.storage?.close();
     } else {