Skip to content

Commit

Permalink
Merge pull request #29 from shogo82148/fix-sleepContext
Browse files Browse the repository at this point in the history
fix sleepContext
  • Loading branch information
shogo82148 committed Jun 24, 2024
2 parents 488a75f + 5a56b9a commit 1a0ed18
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 1a0ed18

Please sign in to comment.