private stopWebSocketPing(): void {
if (this.webSocketPingSetInterval) {
clearInterval(this.webSocketPingSetInterval);
+ delete this.webSocketPingSetInterval;
}
}
private stopHeartbeat(): void {
if (this.heartbeatSetInterval) {
clearInterval(this.heartbeatSetInterval);
+ delete this.heartbeatSetInterval;
}
}
public stop(): void {
if (this.displayInterval) {
clearInterval(this.displayInterval);
+ delete this.displayInterval;
}
performance.clearMarks();
performance.clearMeasures();
}
private startLogStatisticsInterval(): void {
- if (Configuration.getLogStatisticsInterval() > 0) {
+ if (Configuration.getLogStatisticsInterval() > 0 && !this.displayInterval) {
this.displayInterval = setInterval(() => {
this.logStatistics();
}, Configuration.getLogStatisticsInterval() * 1000);
Configuration.getLogStatisticsInterval()
)}`
);
+ } else if (this.displayInterval) {
+ logger.info(
+ `${this.logPrefix()} already logged every ${Utils.formatDurationSeconds(
+ Configuration.getLogStatisticsInterval()
+ )}`
+ );
} else {
logger.info(
`${this.logPrefix()} log interval is set to ${Configuration.getLogStatisticsInterval()?.toString()}. Not logging statistics`