forked from TrueCloudLab/restic
lock: Use the correct duration to check for expired locks
This commit is contained in:
parent
8b7c952f17
commit
7c5d63a794
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ func monitorLockRefresh(ctx context.Context, lock *restic.Lock, lockInfo *lockCo
|
||||||
case <-refreshed:
|
case <-refreshed:
|
||||||
lastRefresh = time.Now().Unix()
|
lastRefresh = time.Now().Unix()
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
if float64(time.Now().Unix()-lastRefresh) < refreshInterval.Seconds() {
|
if float64(time.Now().Unix()-lastRefresh) < refreshabilityTimeout.Seconds() {
|
||||||
// restart timer
|
// restart timer
|
||||||
timer.Reset(pollDuration)
|
timer.Reset(pollDuration)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue