Skip to content

Commit

Permalink
clarify exponential backoff behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Jul 2, 2024
1 parent 7fff77d commit af5274f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/pkg/core/backoff/exponential.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func (b *ExpBackoff) NextWait() time.Duration {
return nextWait
}

// Wait block until either the timer is completed or channel is done.
// Wait blocks until either the exponential backoff timer is completed or the
// done channel is closed.
// Wait returns true until done is closed. When done is closed, wait returns
// immediately, therefore callers should always check the return value.
func (b *ExpBackoff) Wait() bool {
b.duration = b.NextWait()

Expand Down

0 comments on commit af5274f

Please sign in to comment.