From: Jérôme Benoit Date: Wed, 3 Feb 2021 22:27:06 +0000 (+0100) Subject: Fix charging station initialisation X-Git-Tag: v1.0.1-0~104^2~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c7db471811bca32168cbeb4287f06db112bfcd05;p=e-mobility-charging-stations-simulator.git Fix charging station initialisation Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 4f19f2d9..2d9e9a63 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -476,7 +476,8 @@ export default class ChargingStation { await Utils.sleep(this.bootNotificationResponse?.interval ? this.bootNotificationResponse.interval * 1000 : Constants.OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL); } } while (!this.isRegistered() && (registrationRetryCount <= this.getRegistrationMaxRetries() || this.getRegistrationMaxRetries() === -1)); - } else if (this.isRegistered()) { + } + if (this.isRegistered()) { await this.startMessageSequence(); this.hasStopped && (this.hasStopped = false); if (this.hasSocketRestarted && this.isWebSocketOpen()) {