Skip to content

Commit

Permalink
fix sleepContext
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Jun 24, 2024
1 parent 488a75f commit 5a56b9a
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 @@ -174,7 +174,7 @@ func (r *Retrier) sleepContext(ctx context.Context, d time.Duration) error {
}

if d <= 0 {
return ctx.Err()
return nil
}
if deadline, ok := ctx.Deadline(); ok {
if time.Until(deadline) < d {
Expand Down

0 comments on commit 5a56b9a

Please sign in to comment.