Skip to content

Commit

Permalink
Merge pull request #26 from J7mbo/bugfix/#25-time.duration-second-mul…
Browse files Browse the repository at this point in the history
…tiplier

[#25] - Retrier now sleeps correctly given the user provided time.Duration
  • Loading branch information
J7mbo authored Apr 20, 2019
2 parents 77ca82c + 19676bb commit e13a1e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MethodCallRetrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func objectIsAPointer(object interface{}) bool {

/* sleepAndIncrementRetries sleeps for the given wait time and increments the retry count by 1. */
func (r *MethodCallRetrier) sleepAndIncrementRetries() {
time.Sleep(calculateJitter(time.Duration(r.waitTime) * time.Second))
time.Sleep(calculateJitter(r.waitTime))

r.waitTime = time.Duration(int64(r.waitTime) * r.exponent)

Expand Down

0 comments on commit e13a1e6

Please sign in to comment.