Skip to content

Commit

Permalink
Improve the description of WithInfiniteRetry()
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebeckman authored Dec 13, 2023
1 parent 1d4a97f commit 3c5b8c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion retrier/retrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func New(backoff []time.Duration, class Classifier) *Retrier {
}
}

// WithInfiniteRetry set the retrier to loop infinitely on the last backoff duration
// WithInfiniteRetry set the retrier to loop infinitely on the last backoff duration. Using this option,
// the program will not exit until the retried function has been executed successfully.
// WARNING : This may run indefinitely.
func (r *Retrier) WithInfiniteRetry() *Retrier {
r.infiniteRetry = true
return r
Expand Down

0 comments on commit 3c5b8c6

Please sign in to comment.