Update server/index.js
Browse files- 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);
|