From f23be6aad227f8942bb140d286585423fe84f60b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 11 Nov 2023 10:48:20 +0100 Subject: [PATCH] fix: refine CS registration error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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})`, ); } -- 2.34.1