From: Jérôme Benoit Date: Mon, 1 Feb 2021 15:35:52 +0000 (+0100) Subject: Cleanup logic code flow. X-Git-Tag: v1.0.1-0~105^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=594dc437c5f4a82cc8ebeabd1649a479d42c0110;p=e-mobility-charging-stations-simulator.git Cleanup logic code flow. Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index a19ad3b4..a7081aa9 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -460,8 +460,7 @@ 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)); - } - if (this.isRegistered()) { + } else if (this.isRegistered()) { await this.startMessageSequence(); this.hasStopped && (this.hasStopped = false); if (this.hasSocketRestarted && this.isWebSocketOpen()) {