0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-06 22:40:31 -05:00

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

* Turn on KeepAlive in QuicConfig of RoundTripper

* Update reverseproxy.go
This commit is contained in:
Heri Sim 2018-01-16 12:00:59 +08:00 committed by Matt Holt
parent 1ba5512015
commit c80c34ef45

View file

@ -240,6 +240,7 @@ func NewSingleHostReverseProxy(target *url.URL, without string, keepalive int) *
rp.Transport = &h2quic.RoundTripper{
QuicConfig: &quic.Config{
HandshakeTimeout: defaultCryptoHandshakeTimeout,
KeepAlive: true,
},
}
} else if keepalive != http.DefaultMaxIdleConnsPerHost || strings.HasPrefix(target.Scheme, "srv") {