Chromium Code Reviews| Index: common/lhttp/client.go |
| diff --git a/common/lhttp/client.go b/common/lhttp/client.go |
| index 080f4e1828f48dc894c3f5936c2ece396c3a76b1..2fa3a57dc98d2e160bceeafc958a84bdf3683397 100644 |
| --- a/common/lhttp/client.go |
| +++ b/common/lhttp/client.go |
| @@ -39,9 +39,12 @@ type RequestGen func() (*http.Request, error) |
| // The handler func is responsible for closing the response Body before |
| // returning. It should return retry.Error in case of retriable error, for |
| // example if a TCP connection is terminated while receiving the content. |
| +// |
| +// If rFn is nil, NewRequest will use a default exponential backoff strategy only |
|
dsansome-google
2016/12/13 02:36:14
Wrap to 80-chars like the other comments
|
| +// for transient errors. |
| func NewRequest(ctx context.Context, c *http.Client, rFn retry.Factory, rgen RequestGen, handler Handler) func() (int, error) { |
| if rFn == nil { |
| - rFn = retry.Default |
| + rFn = retry.TransientOnly(retry.Default) |
| } |
| return func() (int, error) { |