SetRetryCount allows values less than zero, but the Backoff implementation assumes opts.maxRetries is zero or greater. The result is that Backoff doesn't actually make a request but also doesn't return an error.
Two options for a solution:
- Convert negative values to zero in
SetRetryCount.
- Convert a negative value into
math.MaxInt64 (retry forever) in SetRetryCount.
In either case, Backoff should be updated to return an error if opts.maxRetries is less than zero.
Related to #392