From: Trond Norbye Date: Fri, 18 Dec 2009 11:17:36 +0000 (+0100) Subject: memcached_quit should clear internal server variables X-Git-Tag: 0.37~56^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=04e768d414826cdea61b7b5f7e7e51b3c791feb5;p=awesomized%2Flibmemcached memcached_quit should clear internal server variables --- diff --git a/libmemcached/quit.c b/libmemcached/quit.c index 4abadb94..dc11e97f 100644 --- a/libmemcached/quit.c +++ b/libmemcached/quit.c @@ -53,15 +53,18 @@ void memcached_quit_server(memcached_server_st *ptr, uint8_t io_death) ptr->server_failure_counter= 0; } memcached_io_close(ptr); - - ptr->fd= -1; - ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0); - ptr->read_buffer_length= 0; - ptr->read_ptr= ptr->read_buffer; - memcached_server_response_reset(ptr); } - if(io_death) ptr->server_failure_counter++; + ptr->fd= -1; + ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0); + ptr->read_buffer_length= 0; + ptr->read_ptr= ptr->read_buffer; + memcached_server_response_reset(ptr); + + if(io_death) + { + ptr->server_failure_counter++; + } } void memcached_quit(memcached_st *ptr)