composer and npm

This commit is contained in:
Henry Whitaker
2020-08-25 00:59:44 +01:00
parent 6726d93cc6
commit c8f853dc84
2504 changed files with 88530 additions and 41367 deletions

View File

@@ -31,11 +31,13 @@ module.exports = class WebsocketServer extends BaseServer {
const noop = () => {};
setInterval(() => {
this.wsServer.clients.forEach((ws) => {
if (ws.isAlive === false) return ws.terminate();
this.wsServer.clients.forEach((socket) => {
if (socket.isAlive === false) {
return socket.terminate();
}
ws.isAlive = false;
ws.ping(noop);
socket.isAlive = false;
socket.ping(noop);
});
}, this.server.heartbeatInterval);
}