Skip to content

Commit

Permalink
Add MaxIdemponentCallAttempts to fasthttp.Client (#484)
Browse files Browse the repository at this point in the history
* Add MaxIdemponentCallAttempts to fasthttp.Client
  • Loading branch information
Blless authored and erikdubbelboer committed Nov 29, 2018
1 parent 5836521 commit 1d2d99c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ type Client struct {
// after DefaultMaxIdleConnDuration.
MaxIdleConnDuration time.Duration

// Maximum number of attempts for idempotent calls
//
// DefaultMaxIdemponentCallAttempts is used if not set.
MaxIdemponentCallAttempts int

// Per-connection buffer size for responses' reading.
// This also limits the maximum header size.
//
Expand Down Expand Up @@ -400,6 +405,7 @@ func (c *Client) Do(req *Request, resp *Response) error {
TLSConfig: c.TLSConfig,
MaxConns: c.MaxConnsPerHost,
MaxIdleConnDuration: c.MaxIdleConnDuration,
MaxIdemponentCallAttempts: c.MaxIdemponentCallAttempts,
ReadBufferSize: c.ReadBufferSize,
WriteBufferSize: c.WriteBufferSize,
ReadTimeout: c.ReadTimeout,
Expand Down

0 comments on commit 1d2d99c

Please sign in to comment.