From 57c61e5921930647b4d271024c83501f197ba462 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 24 Aug 2023 12:24:24 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/datatransferlogic.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/websocket/internal/logic/datatransferlogic.go b/server/websocket/internal/logic/datatransferlogic.go index 5282e40f..7aedd98d 100644 --- a/server/websocket/internal/logic/datatransferlogic.go +++ b/server/websocket/internal/logic/datatransferlogic.go @@ -47,8 +47,10 @@ var ( } //升级websocket upgrader = websocket.Upgrader{ - //最大可读取大小 10M - ReadBufferSize: 1024 * 10, + //最大可读取大小 1M + ReadBufferSize: 1024, + //最大可写大小 1M + WriteBufferSize: 1024, //握手超时时间15s HandshakeTimeout: time.Second * 15, //允许跨域 @@ -58,7 +60,7 @@ var ( //写的缓存池 WriteBufferPool: &buffPool, //是否支持压缩 - EnableCompression: true, + EnableCompression: false, } //websocket连接存储 mapConnPool = sync.Map{}