You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: