fix: ensure WS connection retry flag is reset in all connection case
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 2c683058491b713019c10472a8f5c42fe2a45a7c..5c3c13c75d6cc3bec77b2e4f8091c7081611ed65 100644 (file)
@@ -225,6 +225,9 @@ export class ChargingStation extends EventEmitter {
       })
       this.wsConnectionRetried = false
     })
+    this.on(ChargingStationEvents.rejected, () => {
+      this.wsConnectionRetried = false
+    })
     this.on(ChargingStationEvents.disconnected, () => {
       try {
         this.internalStopMessageSequence()