Fix charging station initialisation
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 3 Feb 2021 22:27:06 +0000 (23:27 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 3 Feb 2021 22:27:06 +0000 (23:27 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 4f19f2d9581c810fbb1a25a7e2609d32381a08a3..2d9e9a63ce2c2bf4bbca8cce9673f4b80ad229ba 100644 (file)
@@ -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()) {