Change WS upgraderBufferSize

due to https://github.com/gorilla/websocket/issues/223
This commit is contained in:
风扇滑翔翼 2023-11-28 18:25:37 +08:00 committed by yuhan6665
parent 6f092bd212
commit 69cbb4c47a

View File

@ -28,8 +28,8 @@ type requestHandler struct {
var replacer = strings.NewReplacer("+", "-", "/", "_", "=", "") var replacer = strings.NewReplacer("+", "-", "/", "_", "=", "")
var upgrader = &websocket.Upgrader{ var upgrader = &websocket.Upgrader{
ReadBufferSize: 4 * 1024, ReadBufferSize: 0,
WriteBufferSize: 4 * 1024, WriteBufferSize: 0,
HandshakeTimeout: time.Second * 4, HandshakeTimeout: time.Second * 4,
CheckOrigin: func(r *http.Request) bool { CheckOrigin: func(r *http.Request) bool {
return true return true