Skip to content

Commit

Permalink
fix: ttl bug in case re-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
quexer committed Oct 26, 2023
1 parent bc05fb0 commit b629388
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 b629388

Please sign in to comment.