kill dead websockets more aggressively and log them
This commit is contained in:
parent
a8232757b1
commit
9b7cf6365c
|
@ -176,7 +176,7 @@ class SocketServer {
|
|||
});
|
||||
|
||||
setInterval(this.onlineCounterBroadcast, 10 * 1000);
|
||||
setInterval(this.ping, 45 * 1000);
|
||||
setInterval(this.ping, 15 * 1000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,6 +291,7 @@ class SocketServer {
|
|||
ping() {
|
||||
this.wss.clients.forEach((ws) => {
|
||||
if (!ws.isAlive) {
|
||||
logger.info(`Killing dead websocket from ${ws.user.ip}`);
|
||||
ws.terminate();
|
||||
} else {
|
||||
ws.isAlive = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user