Ensure the ATG connector status is not overwritten at stop
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 25 Sep 2021 20:44:55 +0000 (22:44 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 25 Sep 2021 20:44:55 +0000 (22:44 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/charging-station/AutomaticTransactionGenerator.ts

index 37cbe1b00d2ff11a220f864df7a22fa297c163a5..5fcf83a6d2b345a7444099362a50be0f76fcfa62 100644 (file)
@@ -125,7 +125,7 @@ export default class AutomaticTransactionGenerator {
   }
 
   private stopConnector(connectorId: number): void {
-    this.connectorsStatus.set(connectorId, { start: false });
+    this.connectorsStatus.set(connectorId, { ...this.connectorsStatus.get(connectorId), start: false });
   }
 
   private initStartConnectorStatus(connectorId: number): void {