Update proposed time

This commit is contained in:
Jeff Mitchell 2016-01-29 17:20:20 -05:00
parent 7353fa3e56
commit 4619473175
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ func LeaseExtend(backendIncrement, backendMax time.Duration, systemView logical.
increment = systemView.DefaultLeaseTTL()
}
proposedExpiration := leaseOpts.IssueTime.UTC().Add(increment)
// We are proposing a time of the current time plus the increment
proposedExpiration := now.Add(increment)
// If the proposed expiration is after the maximum TTL of the lease,
// cap the increment to whatever is left