File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ func DefaultPooledTransport() *http.Transport {
33
33
// it can leak file descriptors over time. Only use this for transports that
34
34
// will be re-used for the same host(s).
35
35
func DefaultPooledTransportWithMin (minIdleConnsPerHost int ) * http.Transport {
36
- maxIdleConnsPerHost := runtime .GOMAXPROCS (0 ) + 1
37
36
transport := & http.Transport {
38
37
Proxy : http .ProxyFromEnvironment ,
39
38
DialContext : (& net.Dialer {
@@ -47,6 +46,7 @@ func DefaultPooledTransportWithMin(minIdleConnsPerHost int) *http.Transport {
47
46
ExpectContinueTimeout : 1 * time .Second ,
48
47
ForceAttemptHTTP2 : true ,
49
48
MaxIdleConnsPerHost : func () int {
49
+ maxIdleConnsPerHost := runtime .GOMAXPROCS (0 ) + 1
50
50
if maxIdleConnsPerHost < minIdleConnsPerHost {
51
51
return minIdleConnsPerHost
52
52
}
You can’t perform that action at this time.
0 commit comments