From 95b19f57223b6b3172478c87fb8e9f02cee29870 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:08:09 +0800 Subject: [PATCH] fix: websocket handle error remove when upgrade error. --- internal/msggateway/n_ws_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index cd9bc57f6..cf607d470 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -417,8 +417,8 @@ func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) { // Create a WebSocket long connection object wsLongConn := newGWebSocket(WebSocket, ws.handshakeTimeout, ws.writeBufferSize) if err := wsLongConn.GenerateLongConn(w, r); err != nil { - // If creating the long connection fails, return an error via HTTP and stop processing - httpError(connContext, err) + //If the creation of the long connection fails, the error is handled internally during the handshake process. + log.ZWarn(connContext, "long connection fails", err) return } else { // Check if a normal response should be sent via WebSocket