Skip to content

Doubts about how the lockdown works #288

Answered by doronz88
juanibonini asked this question in Q&A
Discussion options

You must be logged in to vote

The implementation currently isn't thread safe. More specifically, if a connection becomes idle for over a minute, then the next request will reconnect (since lockdownd disconnects idle client automatically).

That means that if a thread will attempt something while the connection is re-established that will lead to some undefined behavior.

I advise keep using a dedicated connection instance per thread. Also, if you would like you are more than welcome to create a PR that adds a locking decorator to resolve this issue 😃

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by doronz88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants