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

locks with ttls are broken #267

Open
Roguelazer opened this issue May 1, 2019 · 0 comments
Open

locks with ttls are broken #267

Roguelazer opened this issue May 1, 2019 · 0 comments

Comments

@Roguelazer
Copy link

In the _acquired function of lock.py, the code first sets a key, then calls watch with no timeout. If the lock is held by a peer who ever calls renew(), this causes an uncaught exception.

Specifically, if you're using TTLs, the key might expire before the watch returns, which causes the later call to _acquired to fail.

The whole idea of having a recursive function which contains an infinite loop is kind of hinky.

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