}
}
- public isWebSocketOpen(): boolean {
+ public isWebSocketConnectionOpened(): boolean {
return this.wsConnection?.readyState === WebSocket.OPEN;
}
this.getConnector(Utils.convertToInt(connector)).status = ChargePointStatus.UNAVAILABLE;
}
}
- if (this.isWebSocketOpen()) {
+ if (this.isWebSocketConnectionOpened()) {
this.wsConnection.close();
}
if (this.getEnableStatistics()) {
if (this.isRegistered()) {
await this.startMessageSequence();
this.hasStopped && (this.hasStopped = false);
- if (this.hasSocketRestarted && this.isWebSocketOpen()) {
+ if (this.hasSocketRestarted && this.isWebSocketConnectionOpened()) {
this.flushMessageQueue();
}
} else {
: 0;
if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
this.webSocketPingSetInterval = setInterval(() => {
- if (this.isWebSocketOpen()) {
+ if (this.isWebSocketConnectionOpened()) {
this.wsConnection.ping((): void => { });
}
}, webSocketPingInterval * 1000);
if (!Utils.isNullOrUndefined(this.stationInfo.supervisionUser) && !Utils.isNullOrUndefined(this.stationInfo.supervisionPassword)) {
options.auth = `${this.stationInfo.supervisionUser}:${this.stationInfo.supervisionPassword}`;
}
- if (this.isWebSocketOpen() && forceCloseOpened) {
+ if (this.isWebSocketConnectionOpened() && forceCloseOpened) {
this.wsConnection.close();
}
let protocol;
break;
}
// Check if wsConnection opened and charging station registered
- if (this.chargingStation.isWebSocketOpen() && (this.chargingStation.isRegistered() || commandName === RequestCommand.BOOT_NOTIFICATION)) {
+ if (this.chargingStation.isWebSocketConnectionOpened() && (this.chargingStation.isRegistered() || commandName === RequestCommand.BOOT_NOTIFICATION)) {
if (this.chargingStation.getEnableStatistics()) {
this.chargingStation.performanceStatistics.addRequestStatistic(commandName, messageType);
}