Skip to content

Commit

Permalink
Bump http timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 6, 2024
1 parent db2e9ad commit a4d4b5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions messagix/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ func NewClient(platform types.Platform, cookies cookies.Cookies, logger zerolog.
cli := &Client{
http: &http.Client{
Transport: &http.Transport{
DialContext: (&net.Dialer{Timeout: 5 * time.Second}).DialContext,
TLSHandshakeTimeout: 5 * time.Second,
ResponseHeaderTimeout: 10 * time.Second,
DialContext: (&net.Dialer{Timeout: 10 * time.Second}).DialContext,
TLSHandshakeTimeout: 10 * time.Second,
ResponseHeaderTimeout: 30 * time.Second,
ForceAttemptHTTP2: true,
},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
Expand All @@ -89,7 +89,7 @@ func NewClient(platform types.Platform, cookies cookies.Cookies, logger zerolog.
}
return nil
},
Timeout: 60 * time.Second,
Timeout: 120 * time.Second,
},
cookies: cookies,
Logger: logger,
Expand Down

0 comments on commit a4d4b5b

Please sign in to comment.