fix: ensure registration status is deleted if invalid boot notification
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 5 Jun 2024 17:31:57 +0000 (19:31 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 5 Jun 2024 17:31:57 +0000 (19:31 +0200)
response is received

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts

index c7a75e43a4034960827c39e1b2dcc510fbbcacd1..4306fc8f4f06d5daa3820a0b0e4e7cde374ad061 100644 (file)
@@ -541,6 +541,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
         ? logger.warn(logMsg)
         : logger.info(logMsg)
     } else {
+      delete chargingStation.bootNotificationResponse
       logger.error(
         `${chargingStation.logPrefix()} Charging station boot notification response received: %j with undefined registration status`,
         payload
index 8a6e2cacb7d7c26b4da9f56c67b2e16b25d9681c..e5fe290774975e77d08706f5af3587ac7757eead 100644 (file)
@@ -207,6 +207,7 @@ export class OCPP20ResponseService extends OCPPResponseService {
         ? logger.warn(logMsg)
         : logger.info(logMsg)
     } else {
+      delete chargingStation.bootNotificationResponse
       logger.error(
         `${chargingStation.logPrefix()} Charging station boot notification response received: %j with undefined registration status`,
         payload