X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=f92ea2b6e96863c01ecca86ecaa91891592073be;hb=156c5f4ee0466adeb90e1e131e98b3f271955787;hp=5a049ec5b9195b071f4920f117a6ea4e4ca59a02;hpb=7f3decca34321ef6f6bf3b7f40a50db75dae1eed;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 5a049ec5..f92ea2b6 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -28,6 +28,7 @@ import { } from './ConfigurationKeyUtils'; import { buildConnectorsMap, + checkChargingStation, checkConnectorsConfiguration, checkStationInfoConnectorStatus, checkTemplate, @@ -776,15 +777,11 @@ export class ChargingStation { ): void { options = { handshakeTimeout: secondsToMilliseconds(this.getConnectionTimeout()), - ...(this.stationInfo?.wsOptions ?? {}), + ...this.stationInfo?.wsOptions, ...options, }; params = { ...{ closeOpened: false, terminateOpened: false }, ...params }; - if (this.started === false && this.starting === false) { - logger.warn( - `${this.logPrefix()} Cannot open OCPP connection to URL ${this.wsConnectionUrl.toString()} - on stopped charging station`, - ); + if (!checkChargingStation(this, this.logPrefix())) { return; } if (