mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-15 16:07:51 +03:00
Add MaxIdemponentCallAttempts to fasthttp.Client (#484)
* Add MaxIdemponentCallAttempts to fasthttp.Client
This commit is contained in:
@@ -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.
|
||||
//
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user