diff --git a/v4/sync/memory/memory.go b/v4/sync/memory/memory.go index 180c3804..37585c94 100644 --- a/v4/sync/memory/memory.go +++ b/v4/sync/memory/memory.go @@ -118,7 +118,7 @@ func (m *memorySync) Lock(id string, opts ...sync.LockOption) error { // release the lock if it expired _ = m.Unlock(id) } else { - ttl = time.After(live) + ttl = time.After(lk.ttl - live) } }