Browse Source

auto update script executed

Toby Chui 1 year ago
parent
commit
40ea6925df
1 changed files with 5 additions and 3 deletions
  1. 5 3
      mod/dynamicproxy/dpcore/dpcore.go

+ 5 - 3
mod/dynamicproxy/dpcore/dpcore.go

@@ -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,
 	}
 }