Removed Ping on CS to check ATESS WS disconnections
MODIFY
src/server/ocpp/json/JsonCentralSystemServer.ts
src/server/ocpp/json/JsonCentralSystemServer.ts
@@ -692,15 +692,15 @@ export default class JsonCentralSystemServer extends CentralSystemServer {
}
private checkAndCleanupAllWebSockets() {
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
- setTimeout(async () => {
- // Check Json connections
- await this.checkAndCleanupWebSockets(this.jsonWSConnections, 'CS');
- // Check Rest connections
- await this.checkAndCleanupWebSockets(this.jsonRestWSConnections, 'REST');
- // Relaunch it
- this.checkAndCleanupAllWebSockets();
- }, Configuration.getChargingStationConfig().pingIntervalOCPPJSecs * 1000);
+ // // eslint-disable-next-line @typescript-eslint/no-misused-promises
+ // setTimeout(async () => {
+ // // Check Json connections
+ // await this.checkAndCleanupWebSockets(this.jsonWSConnections, 'CS');
+ // // Check Rest connections
+ // await this.checkAndCleanupWebSockets(this.jsonRestWSConnections, 'REST');
+ // // Relaunch it
+ // this.checkAndCleanupAllWebSockets();
+ // }, Configuration.getChargingStationConfig().pingIntervalOCPPJSecs * 1000);
}
private async checkAndCleanupWebSockets(wsConnections: Map<string, WSConnection>, type: 'CS'|'REST') {

MODIFY
src/server/ocpp/json/WSWrapper.ts
src/server/ocpp/json/WSWrapper.ts
@@ -60,7 +60,7 @@ export default class WSWrapper {
private checkWSClosed(wsAction: WebSocketAction): void {
if (this.closed) {
- throw new Error(`${wsAction} > WS Connection ID '${this.guid}' is closed ('${this.url}'), cannot perform action`);
+ throw new Error(`${wsAction} > WS Connection ID '${this.guid}' is already closed ('${this.url}'), cannot perform action`);
}
}
}

Removed Ping on CS to check ATESS WS disconnections