Skip to content

Commit

Permalink
Merge pull request #75 from KeiichiHirobe/fix-use-configtimer
Browse files Browse the repository at this point in the history
fix bug, always use config.timer.After instead of time.After
  • Loading branch information
JaSei committed Nov 15, 2022
2 parents f8ec78f + 6632f04 commit affbf8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func Do(retryableFunc RetryableFunc, opts ...Option) error {

config.onRetry(n, err)
select {
case <-time.After(delay(config, n, err)):
case <-config.timer.After(delay(config, n, err)):
case <-config.context.Done():
return nil
}
Expand Down

0 comments on commit affbf8f

Please sign in to comment.