fix: ensure persistence configuration override is taken in all case
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 8a5c5c6fba84ed66b0fb33a32de578bcc3f4ee62..9da4fdbb41934219468867ed824b94fd3fb36cd3 100644 (file)
@@ -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 {