Skip to content

Commit

Permalink
fix bug, always use config.timer.After instead of time.After
Browse files Browse the repository at this point in the history
  • Loading branch information
KeiichiHirobe committed Nov 15, 2022
1 parent f0085d2 commit 6632f04
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 6632f04

Please sign in to comment.