|
@@ -90,14 +90,16 @@ func NewDynamicProxyCore(target *url.URL, prepender string) *ReverseProxy {
|
|
|
}
|
|
|
|
|
|
//Hack the default transporter to handle more connections
|
|
|
- http.DefaultTransport.(*http.Transport).MaxIdleConns = 1000
|
|
|
- http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost = 1000
|
|
|
+ thisTransporter := http.DefaultTransport
|
|
|
+ thisTransporter.(*http.Transport).MaxIdleConns = 1000
|
|
|
+ thisTransporter.(*http.Transport).MaxIdleConnsPerHost = 1000
|
|
|
+ thisTransporter.(*http.Transport).MaxConnsPerHost = 30
|
|
|
|
|
|
return &ReverseProxy{
|
|
|
Director: director,
|
|
|
Prepender: prepender,
|
|
|
Verbal: false,
|
|
|
- Transport: http.DefaultTransport,
|
|
|
+ Transport: thisTransporter,
|
|
|
}
|
|
|
}
|
|
|
|