Skip to content

Commit

Permalink
fix: use default http transport (#1992)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Feb 5, 2024
1 parent ad09102 commit 2b5dc2b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scw/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"math"
"net"
"net/http"
"reflect"
"strconv"
Expand Down Expand Up @@ -546,13 +545,8 @@ func newVariableFromType(t interface{}) interface{} {

func newHTTPClient() *http.Client {
return &http.Client{
Timeout: 30 * time.Second,
Transport: &http.Transport{
DialContext: (&net.Dialer{Timeout: 5 * time.Second}).DialContext,
TLSHandshakeTimeout: 5 * time.Second,
ResponseHeaderTimeout: 30 * time.Second,
MaxIdleConnsPerHost: 20,
},
Timeout: 30 * time.Second,
Transport: http.DefaultTransport.(*http.Transport).Clone(),
}
}

Expand Down

0 comments on commit 2b5dc2b

Please sign in to comment.