fix(*): Maintain server connection

This commit is contained in:
Josh Creek
2023-07-12 17:22:12 +00:00
parent 80cad4a6e3
commit 5d3b4b8461
2 changed files with 12 additions and 4 deletions
+4
View File
@@ -137,6 +137,10 @@ wss.on('connection', (ws: WebSocket, req) => {
emoji
});
}
} else if (data.type === 'ping') {
if (room) {
broadcastToRoom(room.id, 'pong');
}
}
});