increase online counter broadcast delay
This commit is contained in:
parent
771c8681fb
commit
de7e29d9b7
|
@ -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;
|
||||
|
|
|
@ -167,7 +167,7 @@ class SocketServer {
|
|||
});
|
||||
});
|
||||
|
||||
setInterval(this.onlineCounterBroadcast, 10 * 1000);
|
||||
setInterval(this.onlineCounterBroadcast, 20 * 1000);
|
||||
setInterval(this.checkHealth, 15 * 1000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user