diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 19f3704d..e2be99e8 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -138,6 +138,8 @@ func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) logx.Error("http upgrade websocket err:", err) return } + //支持写压缩 + conn.EnableWriteCompression(true) //鉴权不成功后断开 var ( userInfo *auth.UserInfo