fix
This commit is contained in:
parent
dca54ee2b7
commit
57c61e5921
|
@ -47,8 +47,10 @@ var (
|
||||||
}
|
}
|
||||||
//升级websocket
|
//升级websocket
|
||||||
upgrader = websocket.Upgrader{
|
upgrader = websocket.Upgrader{
|
||||||
//最大可读取大小 10M
|
//最大可读取大小 1M
|
||||||
ReadBufferSize: 1024 * 10,
|
ReadBufferSize: 1024,
|
||||||
|
//最大可写大小 1M
|
||||||
|
WriteBufferSize: 1024,
|
||||||
//握手超时时间15s
|
//握手超时时间15s
|
||||||
HandshakeTimeout: time.Second * 15,
|
HandshakeTimeout: time.Second * 15,
|
||||||
//允许跨域
|
//允许跨域
|
||||||
|
@ -58,7 +60,7 @@ var (
|
||||||
//写的缓存池
|
//写的缓存池
|
||||||
WriteBufferPool: &buffPool,
|
WriteBufferPool: &buffPool,
|
||||||
//是否支持压缩
|
//是否支持压缩
|
||||||
EnableCompression: true,
|
EnableCompression: false,
|
||||||
}
|
}
|
||||||
//websocket连接存储
|
//websocket连接存储
|
||||||
mapConnPool = sync.Map{}
|
mapConnPool = sync.Map{}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user