increase online counter broadcast delay

This commit is contained in:
HF 2022-09-07 20:31:07 +02:00
parent 771c8681fb
commit de7e29d9b7
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class SocketClient extends EventEmitter {
checkHealth() {
if (this.readyState === WebSocket.OPEN) {
const now = Date.now();
if (now - 25000 > this.timeLastPing) {
if (now - 30000 > this.timeLastPing) {
// server didn't send anything, probably dead
console.log('Server is silent, killing websocket');
this.readyState = WebSocket.CLOSING;

View File

@ -167,7 +167,7 @@ class SocketServer {
});
});
setInterval(this.onlineCounterBroadcast, 10 * 1000);
setInterval(this.onlineCounterBroadcast, 20 * 1000);
setInterval(this.checkHealth, 15 * 1000);
}