Skip to content

Commit

Permalink
Merge pull request #127 from quexer/fix_sync_ttl
Browse files Browse the repository at this point in the history
fix: ttl bug in case re-lock
  • Loading branch information
jochumdev authored Nov 24, 2023
2 parents bc05fb0 + b629388 commit a0e2f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v4/sync/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit a0e2f80

Please sign in to comment.