Skip to content

Commit 2b5dc2b

Browse files
authored
fix: use default http transport (#1992)
1 parent ad09102 commit 2b5dc2b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

scw/client.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"io"
88
"math"
9-
"net"
109
"net/http"
1110
"reflect"
1211
"strconv"
@@ -546,13 +545,8 @@ func newVariableFromType(t interface{}) interface{} {
546545

547546
func newHTTPClient() *http.Client {
548547
return &http.Client{
549-
Timeout: 30 * time.Second,
550-
Transport: &http.Transport{
551-
DialContext: (&net.Dialer{Timeout: 5 * time.Second}).DialContext,
552-
TLSHandshakeTimeout: 5 * time.Second,
553-
ResponseHeaderTimeout: 30 * time.Second,
554-
MaxIdleConnsPerHost: 20,
555-
},
548+
Timeout: 30 * time.Second,
549+
Transport: http.DefaultTransport.(*http.Transport).Clone(),
556550
}
557551
}
558552

0 commit comments

Comments
 (0)