File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 44 "context"
55 "fmt"
66 "io"
7+ "math"
78 "net/http"
89 "strconv"
910 "strings"
@@ -19,6 +20,7 @@ const (
1920 lbProbeUserAgentPrefix = "Mozilla/5.0 (compatible; Cloudflare-Traffic-Manager/1.0; +https://www.cloudflare.com/traffic-manager/;"
2021 LogFieldConnIndex = "connIndex"
2122 MaxGracePeriod = time .Minute * 3
23+ MaxConcurrentStreams = math .MaxUint32
2224)
2325
2426var switchingProtocolText = fmt .Sprintf ("%d %s" , http .StatusSwitchingProtocols , http .StatusText (http .StatusSwitchingProtocols ))
Original file line number Diff line number Diff line change 44 "context"
55 "fmt"
66 "io"
7- "math"
87 "net"
98 "net/http"
109 "runtime/debug"
@@ -60,7 +59,7 @@ func NewHTTP2Connection(
6059 return & HTTP2Connection {
6160 conn : conn ,
6261 server : & http2.Server {
63- MaxConcurrentStreams : math . MaxUint32 ,
62+ MaxConcurrentStreams : MaxConcurrentStreams ,
6463 },
6564 config : config ,
6665 connOptions : connOptions ,
Original file line number Diff line number Diff line change @@ -358,7 +358,6 @@ func serveTunnel(
358358 config ,
359359 connOptions ,
360360 controlStream ,
361- connectedFuse ,
362361 reconnectCh ,
363362 gracefulShutdownC )
364363
@@ -509,15 +508,16 @@ func ServeQUIC(
509508 config * TunnelConfig ,
510509 connOptions * tunnelpogs.ConnectionOptions ,
511510 controlStreamHandler connection.ControlStreamHandler ,
512- connectedFuse connection.ConnectedFuse ,
513511 reconnectCh chan ReconnectSignal ,
514512 gracefulShutdownC <- chan struct {},
515513) (err error , recoverable bool ) {
516514 tlsConfig := config .EdgeTLSConfigs [connection .QUIC ]
517515 quicConfig := & quic.Config {
518- HandshakeIdleTimeout : quicHandshakeIdleTimeout ,
519- MaxIdleTimeout : quicMaxIdleTimeout ,
520- KeepAlive : true ,
516+ HandshakeIdleTimeout : quicHandshakeIdleTimeout ,
517+ MaxIdleTimeout : quicMaxIdleTimeout ,
518+ MaxIncomingStreams : connection .MaxConcurrentStreams ,
519+ MaxIncomingUniStreams : connection .MaxConcurrentStreams ,
520+ KeepAlive : true ,
521521 }
522522 for {
523523 select {
You can’t perform that action at this time.
0 commit comments