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

addServer() not blocking and causes uncaught exception with Healing enabled #138

Open
drahgon55 opened this issue Jan 11, 2023 · 0 comments

Comments

@drahgon55
Copy link

addServer() is non-blocking. According to the documentation it is supposed to block until a successful or failed connection. The documentation also says that a IOException should be thrown if the client cannot connect. Instead addServer() seems to try to connect on a separate thread and allow the calling thread to immediately continue. In the case of no memcached server being available and healing set to true. addServer() not thrown an immediate IOException and instead returns normally a memcachedClient instance. A background thread keeps trying to connect until retries are exhausted and then an IOException is thrown in that separate thread cause crashing my app unexpectedly.

I had to write some logic to handle this unexpected behavior using the stateListeners.

I think either the logic should be fixed to match the docs or the docs should be edited to match the behavior and possibly some examples added on how to handle memcached server not available when addServer() is called.

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