Closed Julien-R44 closed 1 year ago
Hey Julien
Good question. I looked at the code, and based on that
quit
closes all connections (code).get
will create a new connection and perform the request (code).So callbacks should be executed on get requests that happen after the quit. I suspect the reason the callback is not executed is because of the race condition between quit
and get
as detailed here.
To answer your question, if the callback is not called, it is a bug. If the connection is in the process of being closed, the callback should at least be called with an error.
Hey, thanks for your reply!
Yes, it's definitely that. As soon as I add a setTimeout after the client.quit
then it's OK, the callback is called.
I will try sending a PR
Hello, sorry, I've decided not to support memcached and to use redis instead. So i won't be able to make a PR. Feel free to close the issue
Thanks!
Given this piece of code :
We never enter the
get()
callback because we're disconnected. I was wondering if this was a desired behavior or a bug?