Skip to content

Commit

Permalink
logtail/backoff: update Backoff.BackOff docs (#12229)
Browse files Browse the repository at this point in the history
Update #cleanup

Signed-off-by: Jordan Whited <jordan@tailscale.com>
  • Loading branch information
jwhited committed May 23, 2024
1 parent 538c2e8 commit 4214e5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions logtail/backoff/backoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ func NewBackoff(name string, logf logger.Logf, maxBackoff time.Duration) *Backof
}
}

// Backoff sleeps an increasing amount of time if err is non-nil.
// and the context is not a
// It resets the backoff schedule once err is nil.
// BackOff sleeps an increasing amount of time if err is non-nil while the
// context is active. It resets the backoff schedule once err is nil.
func (b *Backoff) BackOff(ctx context.Context, err error) {
if err == nil {
// No error. Reset number of consecutive failures.
Expand Down

0 comments on commit 4214e5f

Please sign in to comment.