Skip to content

Commit 6aec75a

Browse files
made-30-sec-const
1 parent beb3d6b commit 6aec75a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

internal/wrappers/client.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5152
var (
@@ -187,8 +188,8 @@ func basicProxyClient(timeout uint, proxyStr string) *http.Client {
187188

188189
func 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

208209
func 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

Comments
 (0)