Commit 15d25f1c authored by Matt Holt's avatar Matt Holt Committed by GitHub

Merge pull request #1062 from nemothekid/fix/ws-connection-close

Proxy: Set MaxIdleConnsPerHost to -1 to prevent Idle Conns
parents fdad616d 2ef89059
......@@ -304,7 +304,7 @@ func newConnHijackerTransport(base http.RoundTripper) *connHijackerTransport {
KeepAlive: 30 * time.Second,
}).Dial,
TLSHandshakeTimeout: 10 * time.Second,
DisableKeepAlives: true,
MaxIdleConnsPerHost: -1,
}
if base != nil {
if baseTransport, ok := base.(*http.Transport); ok {
......@@ -313,7 +313,7 @@ func newConnHijackerTransport(base http.RoundTripper) *connHijackerTransport {
transport.TLSHandshakeTimeout = baseTransport.TLSHandshakeTimeout
transport.Dial = baseTransport.Dial
transport.DialTLS = baseTransport.DialTLS
transport.DisableKeepAlives = true
transport.MaxIdleConnsPerHost = -1
}
}
hjTransport := &connHijackerTransport{transport, nil, bufferPool.Get().([]byte)[:0]}
......
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