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

Unlock race condition #65

Open
nikolai-b opened this issue Feb 10, 2020 · 0 comments
Open

Unlock race condition #65

nikolai-b opened this issue Feb 10, 2020 · 0 comments

Comments

@nikolai-b
Copy link

If client A tries to unlock:

return false unless locked?

and the hexists returns true.

Then afterwards a different client (B) cleans up expired keys

moving them from the hset into the list.

Now when client A gets to

signal(@tokens.pop)[1]
it will put the token into the list again so it will appear twice.

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

No branches or pull requests

1 participant