Skip to content

Commit

Permalink
fixed bug in lease registration
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianusIV committed Dec 21, 2023
1 parent f9233da commit 71abe03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/LeaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void RegisterLease(Lease lease, int leaseTime = 0)
//fetch appropriate timer, stop if running, set properties and run
var timer = GetTimer(lease);
timer.Stop();
timer.Interval = leaseTimespan.TotalMilliseconds;
timer.Interval = leaseTimespan.TotalMilliseconds > 0 ? leaseTimespan.TotalMilliseconds : 0;
timer.AutoReset = false;
timer.Start();
}
Expand Down

0 comments on commit 71abe03

Please sign in to comment.