incognitolm commited on
Commit
8d792e8
·
verified ·
1 Parent(s): 4f8cd34

Update server/index.js

Browse files
Files changed (1) hide show
  1. server/index.js +1 -1
server/index.js CHANGED
@@ -58,7 +58,7 @@ wss.on('connection', (ws, req) => {
58
 
59
  ws.on('message', async raw => {
60
  try { await handleWsMessage(ws, JSON.parse(raw.toString()), wsClients); }
61
- catch { safeSend(ws, { type: 'error', message: 'Invalid message' }); }
62
  });
63
  ws.on('close', () => {
64
  const c = wsClients.get(ws);
 
58
 
59
  ws.on('message', async raw => {
60
  try { await handleWsMessage(ws, JSON.parse(raw.toString()), wsClients); }
61
+ catch (ex) { safeSend(ws, { type: 'error', message: 'Invalid message' }); console.log("Invalid message: " + ex); }
62
  });
63
  ws.on('close', () => {
64
  const c = wsClients.get(ws);