This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 1d35ca4bc5 fix(websocket): add error handling (#29538)
1d35ca4bc5 is described below

commit 1d35ca4bc5e91186e7477d1f51ceb6599a9e554d
Author: Harshit <[email protected]>
AuthorDate: Wed Jul 10 20:51:52 2024 +0530

    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 96d056a92f..96a76e0a19 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);

Reply via email to