Fix retryable dep

This commit is contained in:
Jeff Mitchell 2018-05-09 20:52:44 -04:00
parent 2cc9b7fc72
commit f4b98ace65
2 changed files with 5 additions and 5 deletions

View File

@ -213,7 +213,7 @@ func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Resp
if max <= min { if max <= min {
// Unclear what to do here, or they are the same, so return min * // Unclear what to do here, or they are the same, so return min *
// attemptNum // attemptNum
return min * attemptNum return min * time.Duration(attemptNum)
} }
// Seed rand; doing this every time is fine // Seed rand; doing this every time is fine
@ -222,7 +222,7 @@ func LinearJitterBackoff(min, max time.Duration, attemptNum int, resp *http.Resp
// Pick a random number that lies somewhere between the min and max and // Pick a random number that lies somewhere between the min and max and
// multiply by the attemptNum. attemptNum starts at zero so we always // multiply by the attemptNum. attemptNum starts at zero so we always
// increment here. // increment here.
return time.Duration((rand.Int63() % int64(max-min)) * attemptNum) return time.Duration((rand.Int63() % int64(max-min)) * int64(attemptNum))
} }
// PassthroughErrorHandler is an ErrorHandler that directly passes through the // PassthroughErrorHandler is an ErrorHandler that directly passes through the

6
vendor/vendor.json vendored
View File

@ -1141,10 +1141,10 @@
"revisionTime": "2018-03-31T00:25:53Z" "revisionTime": "2018-03-31T00:25:53Z"
}, },
{ {
"checksumSHA1": "Zg/eHcBFPznCeqiRBQeV8WQw9G8=", "checksumSHA1": "3iOEPoU3QvetU5xPFTg+Oqsl+WU=",
"path": "github.com/hashicorp/go-retryablehttp", "path": "github.com/hashicorp/go-retryablehttp",
"revision": "936ce55c28f313d8cf79061ffcb25a55bf631eb6", "revision": "7d12bb7d610c15e57fbbe304084a87fe87574591",
"revisionTime": "2018-05-10T00:49:21Z" "revisionTime": "2018-05-10T00:52:31Z"
}, },
{ {
"checksumSHA1": "A1PcINvF3UiwHRKn8UcgARgvGRs=", "checksumSHA1": "A1PcINvF3UiwHRKn8UcgARgvGRs=",