mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-09-11 19:22:30 +00:00
Update direct dependencies where possible
This commit is contained in:
13
vendor/github.com/jpillora/backoff/backoff.go
generated
vendored
13
vendor/github.com/jpillora/backoff/backoff.go
generated
vendored
@@ -71,7 +71,8 @@ func (b *Backoff) ForAttempt(attempt float64) time.Duration {
|
||||
//keep within bounds
|
||||
if dur < min {
|
||||
return min
|
||||
} else if dur > max {
|
||||
}
|
||||
if dur > max {
|
||||
return max
|
||||
}
|
||||
return dur
|
||||
@@ -86,3 +87,13 @@ func (b *Backoff) Reset() {
|
||||
func (b *Backoff) Attempt() float64 {
|
||||
return b.attempt
|
||||
}
|
||||
|
||||
// Copy returns a backoff with equals constraints as the original
|
||||
func (b *Backoff) Copy() *Backoff {
|
||||
return &Backoff{
|
||||
Factor: b.Factor,
|
||||
Jitter: b.Jitter,
|
||||
Min: b.Min,
|
||||
Max: b.Max,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user