fix(websocket): add error handling (#29538)

This commit is contained in:
Harshit
2024-07-10 18:21:52 +03:00
committed by GitHub
parent 17a4537215
commit 1d35ca4bc5
+3
View File
@@ -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);