- this.bootNotificationResponse = await this.ocppRequestService.sendBootNotification(this.bootNotificationRequest.chargePointModel,
- this.bootNotificationRequest.chargePointVendor, this.bootNotificationRequest.chargeBoxSerialNumber, this.bootNotificationRequest.firmwareVersion);
- if (!this.isRegistered()) {
- registrationRetryCount++;
- await Utils.sleep(this.bootNotificationResponse?.interval ? this.bootNotificationResponse.interval * 1000 : Constants.OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL);
+ this.bootNotificationResponse = await this.ocppRequestService.sendBootNotification(
+ this.bootNotificationRequest.chargePointModel,
+ this.bootNotificationRequest.chargePointVendor,
+ this.bootNotificationRequest.chargeBoxSerialNumber,
+ this.bootNotificationRequest.firmwareVersion
+ );
+ if (!this.isInAcceptedState()) {
+ this.getRegistrationMaxRetries() !== -1 && registrationRetryCount++;
+ await Utils.sleep(
+ this.bootNotificationResponse?.interval
+ ? this.bootNotificationResponse.interval * 1000
+ : Constants.OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL
+ );