Skip to content

Commit

Permalink
Merge pull request nsqio#150 from judwhite/master
Browse files Browse the repository at this point in the history
update FullJitterStrategy Calculate to not bound by MaxBackoffDuration
  • Loading branch information
mreiferson committed Jul 15, 2015
2 parents 9a034a8 + 9d87c3c commit a3aee1d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ func (s *FullJitterStrategy) Calculate(attempt int) time.Duration {

backoffDuration := s.cfg.BackoffMultiplier *
time.Duration(math.Pow(2, float64(attempt)))
if backoffDuration > s.cfg.MaxBackoffDuration {
backoffDuration = s.cfg.MaxBackoffDuration
}
return time.Duration(s.rng.Intn(int(backoffDuration)))
}

Expand Down

0 comments on commit a3aee1d

Please sign in to comment.