Fix connectors status at reset.
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 Feb 2021 00:18:13 +0000 (01:18 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 1 Feb 2021 00:18:13 +0000 (01:18 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts

index 863d5111210f1181a063ed53c2f46dab374ec133..c532eea01dc72b2a008862a61d98164ebfdbda43 100644 (file)
@@ -461,6 +461,7 @@ export default class ChargingStation {
     }
     if (this.isRegistered()) {
       await this.startMessageSequence();
+      this.hasStopped && (this.hasStopped = false);
       if (this.hasSocketRestarted && this.isWebSocketOpen()) {
         if (!Utils.isEmptyArray(this.messageQueue)) {
           this.messageQueue.forEach((message, index) => {
index a17c2e926e52cddf3c7636a9aaa552783cff49f5..31802460a8fb4e2d626a5651fb9b086a8f73e863 100644 (file)
@@ -24,7 +24,6 @@ export default class OCPP16ResponseService extends OCPPResponseService {
       this.chargingStation.heartbeatSetInterval ? this.chargingStation.restartHeartbeat() : this.chargingStation.startHeartbeat();
       this.chargingStation.addConfigurationKey(OCPP16StandardParametersKey.HeartBeatInterval, payload.interval.toString());
       this.chargingStation.addConfigurationKey(OCPP16StandardParametersKey.HeartbeatInterval, payload.interval.toString(), false, false);
-      this.chargingStation.hasStopped && (this.chargingStation.hasStopped = false);
     } else if (payload.status === OCPP16RegistrationStatus.PENDING) {
       logger.info(this.chargingStation.logPrefix() + ' Charging station in pending state on the central server');
     } else {