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

This commit is contained in:
Harshit
2024-07-10 20:51:52 +05:30
committed by GitHub
parent 17a4537215
commit 1d35ca4bc5

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);