Commit c80c34ef authored by Heri Sim's avatar Heri Sim Committed by Matt Holt

proxy: Turn on KeepAlive in QuicConfig of RoundTripper (#1943)

* Turn on KeepAlive in QuicConfig of RoundTripper

* Update reverseproxy.go
parent 1ba55120
...@@ -240,6 +240,7 @@ func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) * ...@@ -240,6 +240,7 @@ func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) *
rp.Transport = &h2quic.RoundTripper{ rp.Transport = &h2quic.RoundTripper{
QuicConfig: &quic.Config{ QuicConfig: &quic.Config{
HandshakeTimeout: defaultCryptoHandshakeTimeout, HandshakeTimeout: defaultCryptoHandshakeTimeout,
KeepAlive: true,
}, },
} }
} else if keepalive != http.DefaultMaxIdleConnsPerHost || strings.HasPrefix(target.Scheme, "srv") { } else if keepalive != http.DefaultMaxIdleConnsPerHost || strings.HasPrefix(target.Scheme, "srv") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment