From: Jérôme Benoit Date: Sat, 11 Nov 2023 09:48:20 +0000 (+0100) Subject: fix: refine CS registration error message X-Git-Tag: v1.2.24~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f23be6aad227f8942bb140d286585423fe84f60b;p=e-mobility-charging-stations-simulator.git fix: refine CS registration error message Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 0dce59fb..4525b8b7 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1735,9 +1735,9 @@ export class ChargingStation extends EventEmitter { logger.info( `${this.logPrefix()} Connection to OCPP server through ${this.wsConnectionUrl.toString()} succeeded`, ); + let registrationRetryCount = 0; if (this.isRegistered() === false) { // Send BootNotification - let registrationRetryCount = 0; do { this.bootNotificationResponse = await this.ocppRequestService.requestHandler< BootNotificationRequest, @@ -1767,7 +1767,7 @@ export class ChargingStation extends EventEmitter { } } else { logger.error( - `${this.logPrefix()} Registration failure: max retries reached or retry disabled (${this + `${this.logPrefix()} Registration failure: maximum retries reached (${registrationRetryCount}) or retry disabled (${this .stationInfo?.registrationMaxRetries})`, ); }