From 4214e5f71b60707699b11bfe4d5f88c5d55690e4 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Thu, 23 May 2024 09:53:05 -0700 Subject: [PATCH] logtail/backoff: update Backoff.BackOff docs (#12229) Update #cleanup Signed-off-by: Jordan Whited --- logtail/backoff/backoff.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/logtail/backoff/backoff.go b/logtail/backoff/backoff.go index 72831f59264e0..f135da52a8769 100644 --- a/logtail/backoff/backoff.go +++ b/logtail/backoff/backoff.go @@ -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.