diff --git a/src/services/webSocketServer/index.ts b/src/services/webSocketServer/index.ts index d9f2c5e7e..250c6b4ab 100644 --- a/src/services/webSocketServer/index.ts +++ b/src/services/webSocketServer/index.ts @@ -47,6 +47,7 @@ export class WebSocketServer extends EventEmitter implements IWebSocketServer { } private _onSocketConnection(socket: MyWebSocket, req: IncomingMessage): void { + socket.on("error", this._onSocketError); const { query = {} } = url.parse(req.url ?? '', true); const { id, token, key }: IAuthParams = query;