Skip to content

Commit

Permalink
Increase max retry count and header timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 4, 2024
1 parent 22aa162 commit ebf4b05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion messagix/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func NewClient(cookies *cookies.Cookies, logger zerolog.Logger) *Client {
Transport: &http.Transport{
DialContext: (&net.Dialer{Timeout: 10 * time.Second}).DialContext,
TLSHandshakeTimeout: 10 * time.Second,
ResponseHeaderTimeout: 20 * time.Second,
ResponseHeaderTimeout: 40 * time.Second,
ForceAttemptHTTP2: true,
},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
Expand Down
2 changes: 1 addition & 1 deletion messagix/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (c *Client) NewHttpQuery() *HttpQuery {
return query
}

const MaxHTTPRetries = 3
const MaxHTTPRetries = 5

func (c *Client) MakeRequest(url string, method string, headers http.Header, payload []byte, contentType types.ContentType) (*http.Response, []byte, error) {
var attempts int
Expand Down

0 comments on commit ebf4b05

Please sign in to comment.