Commit dbe2baf2 authored by Mike Hibler's avatar Mike Hibler

When Extend()ing a lease, set expiration time to current time + increment.

Previously, we just added to the old end_time which could result in a
time that was still in the past!
parent abeca1e2
......@@ -907,10 +907,10 @@ sub Extend($$)
# If the expiration time has been reached, extend it by the
# indicated time.
# indicated time (from the current time).
if ($self->IsExpired()) {
if ($self->AddTime($addtime)) {
if ($self->SetEndTime(time() + $addtime)) {
print STDERR
"$self: Extend: could not extend lease\n";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment