This bug is still not fixed in libmemcached 1.0.16
When memcached_quit_server is called, libmemcached calls close_socket which will set the state to NEW. Then mark_server_for_timeout will reset the next_retry.
As a quick fix, I copied the code of mark_server_for_timeout in memcached_quit_server without the part that reset the next_retry.
My tests are fine now, but maybe I broke something.
-------------------------------------------
void memcached_quit_server(org::libmemcached::Instance* instance, bool io_death)
{
if (instance->valid())
{
if (io_death == false and memcached_is_udp(instance->root) == false and instance->is_shutting_down() == false)
{
send_quit_message(instance);
This bug is still not fixed in libmemcached 1.0.16
When memcached_ quit_server is called, libmemcached calls close_socket which will set the state to NEW. Then mark_server_ for_timeout will reset the next_retry.
As a quick fix, I copied the code of mark_server_ for_timeout in memcached_ quit_server without the part that reset the next_retry.
My tests are fine now, but maybe I broke something.
------- ------- ------- ------- ------- ------- - quit_server( org::libmemcach ed::Instance* instance, bool io_death) is_udp( instance- >root) == false and instance- >is_shutting_ down() == false) quit_message( instance) ;
void memcached_
{
if (instance->valid())
{
if (io_death == false and memcached_
{
send_
instance- >start_ close_socket( ); instance( instance) ;
drain_
}
}
instance- >close_ socket( );
if (io_death) >state= MEMCACHED_ SERVER_ STATE_IN_ TIMEOUT; >server_ failure_ counter_ query_id != instance- >root-> query_id)
instance- >server_ failure_ counter+ +;
instance- >server_ failure_ counter_ query_id= instance- >root-> query_id; last_disconnect ed_host( instance) ; ------- ------- ------- ------- -----
{
instance-
if (instance-
{
}
set_
}
}
-------