From e74bc54995a3758d3e3a60af3eb2bb36eb78d2e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 7 Jul 2023 22:51:14 +0200 Subject: [PATCH] fix: clear idtags cache at template file change 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index ba43ff98..77e93ed6 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -698,9 +698,9 @@ export class ChargingStation { } file have changed, reload` ); this.sharedLRUCache.deleteChargingStationTemplate(this.templateFileHash); - // FIXME: cleanup idtags cache if idtags file has changed // Initialize this.initialize(); + this.idTagsCache.deleteIdTags(getIdTagsFile(this.stationInfo)); // Restart the ATG this.stopAutomaticTransactionGenerator(); if (this.getAutomaticTransactionGeneratorConfiguration()?.enable === true) { @@ -984,9 +984,9 @@ export class ChargingStation { case ReservationTerminationReason.TRANSACTION_STARTED: delete connector.reservation; break; - case ReservationTerminationReason.RESERVATION_CANCELED || - ReservationTerminationReason.REPLACE_EXISTING || - ReservationTerminationReason.EXPIRED: + case ReservationTerminationReason.RESERVATION_CANCELED: + case ReservationTerminationReason.REPLACE_EXISTING: + case ReservationTerminationReason.EXPIRED: await OCPPServiceUtils.sendAndSetConnectorStatus( this, reservation.connectorId, -- 2.34.1