add ping on ws connect
This commit is contained in:
@@ -34,6 +34,7 @@ wss.on('connection', function connection(ws: WebSocket & { isAlive: boolean }, r
|
|||||||
ws.isAlive = true
|
ws.isAlive = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ws.ping();
|
||||||
})
|
})
|
||||||
|
|
||||||
const interval = setInterval(function ping() {
|
const interval = setInterval(function ping() {
|
||||||
|
|||||||
Reference in New Issue
Block a user