Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ttl bug in case re-lock #127

Merged
merged 1 commit into from
Nov 24, 2023
Merged

fix: ttl bug in case re-lock #127

merged 1 commit into from
Nov 24, 2023

Conversation

quexer
Copy link
Contributor

@quexer quexer commented Oct 26, 2023

There seems to be a typo here.


Simple showcase:

  m := memory.NewSync()
  
  // success immediately
  _ = m.Lock("test", sync.LockTTL(time.Hour))
  
  // **Should block and wait**, but it also succeeds immediately, which is incorrect
  _ = m.Lock("test", sync.LockTTL(time.Hour))

@quexer
Copy link
Contributor Author

quexer commented Oct 26, 2023

@jochumdev could you pls review and merge this pr ? thanks

@jochumdev jochumdev self-assigned this Nov 24, 2023
@jochumdev jochumdev merged commit a0e2f80 into micro:main Nov 24, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants