if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
this.webSocketPingSetInterval = setInterval(() => {
if (this.isWebSocketConnectionOpened()) {
- this.wsConnection.ping((): void => { });
+ this.wsConnection.ping((): void => { /* This is intentional */ });
}
}, webSocketPingInterval * 1000);
logger.info(this.logPrefix() + ' WebSocket ping started every ' + Utils.secondsToHHMMSS(webSocketPingInterval));
setTimeout(() => {
this.chargingStation.ocppRequestService.sendBootNotification(this.chargingStation.getBootNotificationRequest().chargePointModel,
this.chargingStation.getBootNotificationRequest().chargePointVendor, this.chargingStation.getBootNotificationRequest().chargeBoxSerialNumber,
- this.chargingStation.getBootNotificationRequest().firmwareVersion).catch(() => {});
+ this.chargingStation.getBootNotificationRequest().firmwareVersion).catch(() => { /* This is intentional */ });
}, Constants.OCPP_TRIGGER_MESSAGE_DELAY);
return Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_ACCEPTED;
case MessageTrigger.Heartbeat:
setTimeout(() => {
- this.chargingStation.ocppRequestService.sendHeartbeat().catch(() => {});
+ this.chargingStation.ocppRequestService.sendHeartbeat().catch(() => { /* This is intentional */ });
}, Constants.OCPP_TRIGGER_MESSAGE_DELAY);
return Constants.OCPP_TRIGGER_MESSAGE_RESPONSE_ACCEPTED;
default:
logger.debug(`${self.chargingStation.logPrefix()} Error: %j occurred when calling command %s with parameters: %j`, error, commandName, commandParams);
// Build Exception
// eslint-disable-next-line no-empty-function
- self.chargingStation.requests.set(messageId, [() => { }, () => { }, {}]);
+ self.chargingStation.requests.set(messageId, [() => { /* This is intentiomal */ }, () => { /* This is intentiomal */ }, {}]);
// Send error
reject(error);
}
constructor(workerScript: string, maxElementsPerWorker = 1, workerStartDelay?: number, opts?: WorkerOptions) {
super(workerScript, workerStartDelay);
this.maxElementsPerWorker = maxElementsPerWorker;
- this.messageHandler = opts?.messageHandler ?? (() => { });
+ this.messageHandler = opts?.messageHandler ?? (() => { /* This is intentional */ });
this.workerSet = new Set<WorkerSetElement>();
}
worker.on('message', (msg) => {
(async () => {
await this.messageHandler(msg);
- })().catch(() => {});
+ })().catch(() => { /* This is intentional */ });
});
worker.on('error', () => { /* This is intentional */ });
worker.on('exit', (code) => {