소스 검색

auto update script executed

Toby Chui 1 년 전
부모
커밋
40ea6925df
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  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,
 	}
 }