Revert "Backoff.Linear: panic when InitialBackoff > MaxBackoff"
This reverts commit 39cfacd5fa6a7317a4c9f8658a1753812cc48bc0.
This commit is contained in:
parent
39cfacd5fa
commit
ca33f8bc5c
@ -94,9 +94,6 @@ type Backoff struct {
|
||||
// n = n * Multiplier.
|
||||
// the first value of n is InitialBackoff. n is maxed by MaxBackoff.
|
||||
func (lb *Backoff) Linear() time.Duration {
|
||||
if lb.InitialBackoff > lb.MaxBackoff {
|
||||
panic("InitialBackoff > MaxBackoff, did you forgot setting the seconds ?")
|
||||
}
|
||||
wait := lb.InitialBackoff
|
||||
lb.InitialBackoff = time.Duration(lb.Multiplier * float64(lb.InitialBackoff))
|
||||
if lb.MaxBackoff != 0 && lb.InitialBackoff > lb.MaxBackoff {
|
||||
|
Loading…
x
Reference in New Issue
Block a user