From: Jérôme Benoit Date: Mon, 1 Feb 2021 00:18:13 +0000 (+0100) Subject: Fix connectors status at reset. X-Git-Tag: v1.0.1-0~105^2~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3ba49ba9f96d06c09f19009dcbe9360eb172782a;p=e-mobility-charging-stations-simulator.git Fix connectors status at reset. Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 863d5111..c532eea0 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -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) => { diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index a17c2e92..31802460 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -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 {