Refine lint staged configuration
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 959b6c2c506d471829c3e018bca5deb4f9c714ef..85a62c589d2549e96fd86249cf3fa0e72e80aef0 100644 (file)
@@ -1199,10 +1199,17 @@ export default class ChargingStation {
     }
     // Initialize transaction attributes on connectors
     for (const connectorId of this.connectors.keys()) {
+      if (connectorId > 0 && this.getConnectorStatus(connectorId).transactionStarted === true) {
+        logger.warn(
+          `${this.logPrefix()} Connector ${connectorId} at initialization has a transaction started: ${
+            this.getConnectorStatus(connectorId).transactionId
+          }`
+        );
+      }
       if (
         connectorId > 0 &&
         (this.getConnectorStatus(connectorId).transactionStarted === undefined ||
-          this.getConnectorStatus(connectorId).transactionStarted === false)
+          this.getConnectorStatus(connectorId).transactionStarted === null)
       ) {
         this.initializeConnectorStatus(connectorId);
       }
@@ -1843,9 +1850,7 @@ export default class ChargingStation {
     if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
       this.webSocketPingSetInterval = setInterval(() => {
         if (this.isWebSocketConnectionOpened() === true) {
-          this.wsConnection.ping((): void => {
-            /* This is intentional */
-          });
+          this.wsConnection.ping();
         }
       }, webSocketPingInterval * 1000);
       logger.info(