Skip to content

Commit

Permalink
Merge pull request #8522 from gyuho/lessor
Browse files Browse the repository at this point in the history
lease: use time.Until in 'Remaining'
  • Loading branch information
gyuho authored Sep 8, 2017
2 parents 6e39a39 + 0e0d9e4 commit 70c20a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lease/lessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func (l *Lease) Remaining() time.Duration {
if l.expiry.IsZero() {
return time.Duration(math.MaxInt64)
}
return l.expiry.Sub(time.Now())
return time.Until(l.expiry)
}

type LeaseItem struct {
Expand Down

0 comments on commit 70c20a9

Please sign in to comment.