repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle missing interval in boot notification response.
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ChargingStation.ts
diff --git
a/src/charging-station/ChargingStation.ts
b/src/charging-station/ChargingStation.ts
index dce900c758c224982e6fa2703c4ac8e1b53c06b3..5bf359b632f9c906923b7304daac47ebfedd28ea 100644
(file)
--- a/
src/charging-station/ChargingStation.ts
+++ b/
src/charging-station/ChargingStation.ts
@@
-661,7
+661,7
@@
export default class ChargingStation {
this._bootNotificationResponse = await this.sendBootNotification();
if (!this._isRegistered()) {
registrationRetryCount++;
this._bootNotificationResponse = await this.sendBootNotification();
if (!this._isRegistered()) {
registrationRetryCount++;
- await Utils.sleep(this._bootNotificationResponse
.interval * 1000
);
+ 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));
}
}
} while (!this._isRegistered() && (registrationRetryCount <= this._getRegistrationMaxRetries() || this._getRegistrationMaxRetries() === -1));
}