File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,16 @@ func NewHTTPClientFromParams(params *object.Map) (*http.Client, error) {
58
58
}
59
59
}
60
60
61
+ // Process DisableKeepAlives option
62
+ disableKeepAlives := false
63
+ if disableKeepAlivesObj := params .GetWithDefault ("disable_keep_alives" , nil ); disableKeepAlivesObj != nil {
64
+ disableKeepAlivesVal , errObj := object .AsBool (disableKeepAlivesObj )
65
+ if errObj != nil {
66
+ return nil , errObj .Value ()
67
+ }
68
+ disableKeepAlives = disableKeepAlivesVal
69
+ }
70
+
61
71
transport := & http.Transport {
62
72
Proxy : http .ProxyFromEnvironment ,
63
73
ForceAttemptHTTP2 : true ,
@@ -66,8 +76,7 @@ func NewHTTPClientFromParams(params *object.Map) (*http.Client, error) {
66
76
TLSClientConfig : & tlsConfig ,
67
77
TLSHandshakeTimeout : 10 * time .Second ,
68
78
ExpectContinueTimeout : 1 * time .Second ,
69
- // !!! For testing goals
70
- DisableKeepAlives : true ,
79
+ DisableKeepAlives : disableKeepAlives ,
71
80
}
72
81
73
82
if proxyObj := params .GetWithDefault ("proxy" , nil ); proxyObj != nil {
You can’t perform that action at this time.
0 commit comments