From 8fc19e1fb2633b555ed25b359d554a55391ae83d Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 12 Sep 2023 12:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/websocket/internal/logic/datatransferlogic.go | 2 ++ 1 file changed, 2 insertions(+) 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