Fix h2 buffer too large

This commit is contained in:
世界 2023-04-25 17:30:12 +08:00
parent ff03af056a
commit b0a6ffd840
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -38,6 +38,7 @@ func newH2MuxServer(conn net.Conn) *h2MuxServerSession {
done: make(chan struct{}), done: make(chan struct{}),
server: http2.Server{ server: http2.Server{
IdleTimeout: idleTimeout, IdleTimeout: idleTimeout,
MaxReadFrameSize: buf.BufferSize,
}, },
} }
go func() { go func() {
@ -169,6 +170,7 @@ func newH2MuxClient(conn net.Conn) (*h2MuxClientSession, error) {
return conn, nil return conn, nil
}, },
ReadIdleTimeout: idleTimeout, ReadIdleTimeout: idleTimeout,
MaxReadFrameSize: buf.BufferSize,
}, },
done: make(chan struct{}), done: make(chan struct{}),
} }