mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
fix(server): fix read limit in ws-server
This commit is contained in:
parent
96e0411c97
commit
e8ac7ca81c
@ -313,6 +313,7 @@ func (s *webSocketServer) any(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (s *webSocketServer) listenAPI(c *wsConn) {
|
||||
defer func() { _ = c.Close(websocket.StatusNormalClosure, "") }()
|
||||
c.Conn.SetReadLimit(1024 * 1024 * 128)
|
||||
for {
|
||||
buffer := global.NewBuffer()
|
||||
t, reader, err := c.Reader(context.Background())
|
||||
|
Loading…
x
Reference in New Issue
Block a user