Skip to content

Commit

Permalink
Update connection timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Oct 22, 2024
1 parent 6133e85 commit 113f804
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions service/connection/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const (
var (
clientTransport = &http.Transport{
DisableKeepAlives: true,
TLSHandshakeTimeout: 5 * time.Second,
TLSHandshakeTimeout: 8 * time.Second,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
MinVersion: tls.VersionTLS12,
Expand All @@ -52,11 +52,7 @@ var (
}
clientInsecure = &http.Client{
Transport: clientTransport,
Timeout: 10 * time.Second,
}
clientConnInsecure = &http.Client{
Transport: clientTransport,
Timeout: 30 * time.Second,
Timeout: 40 * time.Second,
}
)

Expand Down Expand Up @@ -981,7 +977,7 @@ func (c *Client) EncRequest(method string, reqUrl *url.URL,
c.requestCancel = cancel
c.requestCancelLock.Unlock()

resp, err = clientConnInsecure.Do(req)
resp, err = clientInsecure.Do(req)
if err != nil {
err = &errortypes.RequestError{
errors.Wrap(err, "profile: Request put error"),
Expand Down

0 comments on commit 113f804

Please sign in to comment.