- this.connectorsStatus.set(connectorId, {
- ...this.connectorsStatus.get(connectorId),
- start: false,
- });
+ if (this.chargingStation.connectors.has(connectorId) === false) {
+ logger.warn(`${this.logPrefix(connectorId)} stopping on non existing connector`);
+ return;
+ }
+ if (this.connectorsStatus.get(connectorId)?.start === true) {
+ this.connectorsStatus.set(connectorId, {
+ ...this.connectorsStatus.get(connectorId),
+ start: false,
+ });
+ } else if (this.connectorsStatus.get(connectorId)?.start === false) {
+ logger.warn(`${this.logPrefix(connectorId)} is already stopped on connector`);
+ }