From 6767e9f1c0c3f54684eec2f01ae958272c786ca5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 11 Feb 2024 13:33:26 +0100 Subject: [PATCH] fix: do not leak event listeners at charging station deletion 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 8a5c5c6f..9da4fdbb 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -686,6 +686,7 @@ export class ChargingStation extends EventEmitter { deleteConfiguration && rmSync(this.configurationFile, { force: true }) this.chargingStationWorkerBroadcastChannel.unref() this.emit(ChargingStationEvents.deleted) + this.removeAllListeners() } public start (): void { -- 2.34.1