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{}