From 1d35ca4bc5e91186e7477d1f51ceb6599a9e554d Mon Sep 17 00:00:00 2001 From: Harshit Date: Wed, 10 Jul 2024 20:51:52 +0530 Subject: [PATCH] fix(websocket): add error handling (#29538) --- superset-websocket/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/superset-websocket/src/index.ts b/superset-websocket/src/index.ts index 96d056a92ff3c..96a76e0a19471 100644 --- a/superset-websocket/src/index.ts +++ b/superset-websocket/src/index.ts @@ -465,6 +465,9 @@ export const cleanChannel = (channel: string) => { if (startServer) { // init server event listeners + wss.on('connection', function (ws) { + ws.on('error', console.error); + }); wss.on('connection', wsConnection); httpServer.on('request', httpRequest); httpServer.on('upgrade', httpUpgrade);