From 7c5d63a7944d6ac49c0795827618430a9fca45a4 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 7 Oct 2022 22:39:53 +0200 Subject: [PATCH] lock: Use the correct duration to check for expired locks --- cmd/restic/lock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/lock.go b/cmd/restic/lock.go index 1a8386de5..851dcefe8 100644 --- a/cmd/restic/lock.go +++ b/cmd/restic/lock.go @@ -145,7 +145,7 @@ func monitorLockRefresh(ctx context.Context, lock *restic.Lock, lockInfo *lockCo case <-refreshed: lastRefresh = time.Now().Unix() case <-timer.C: - if float64(time.Now().Unix()-lastRefresh) < refreshInterval.Seconds() { + if float64(time.Now().Unix()-lastRefresh) < refreshabilityTimeout.Seconds() { // restart timer timer.Reset(pollDuration) continue