@@ -46,6 +46,7 @@ const (
4646 contentTypeHeader = "Content-Type"
4747 formURLContentType = "application/x-www-form-urlencoded"
4848 jsonContentType = "application/json"
49+ defaultDialerDuration = 30 * time .Second
4950)
5051
5152var (
@@ -187,8 +188,8 @@ func basicProxyClient(timeout uint, proxyStr string) *http.Client {
187188
188189func ntmlProxyClient (timeout uint , proxyStr string ) * http.Client {
189190 dialer := & net.Dialer {
190- Timeout : 30 * time . Second ,
191- KeepAlive : 30 * time . Second ,
191+ Timeout : defaultDialerDuration ,
192+ KeepAlive : defaultDialerDuration ,
192193 }
193194 u , _ := url .Parse (proxyStr )
194195 domainStr := viper .GetString (commonParams .ProxyDomainKey )
@@ -207,8 +208,8 @@ func ntmlProxyClient(timeout uint, proxyStr string) *http.Client {
207208
208209func kerberosProxyClient (timeout uint , proxyStr string ) * http.Client {
209210 dialer := & net.Dialer {
210- Timeout : 30 * time . Second ,
211- KeepAlive : 30 * time . Second ,
211+ Timeout : defaultDialerDuration ,
212+ KeepAlive : defaultDialerDuration ,
212213 }
213214 u , _ := url .Parse (proxyStr )
214215
0 commit comments