Skip to content

Commit

Permalink
go 1.7 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Sep 21, 2018
1 parent 047b249 commit 65221e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (b *backOffContext) NextBackOff() time.Duration {
default:
}
next := b.BackOff.NextBackOff()
if deadline, ok := b.ctx.Deadline(); ok && time.Until(deadline) < next {
if deadline, ok := b.ctx.Deadline(); ok && deadline.Sub(time.Now()) < next {
return Stop
}
return next
Expand Down

0 comments on commit 65221e6

Please sign in to comment.