From: Eric Lambert Date: Tue, 24 Feb 2009 12:18:04 +0000 (-0800) Subject: do function should not increment response counter in no reply mode X-Git-Tag: 0.27~28 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=be8517b3df8bd7caf7f76f03156efec7dead00ce;p=m6w6%2Flibmemcached do function should not increment response counter in no reply mode --- diff --git a/libmemcached/memcached_do.c b/libmemcached/memcached_do.c index f788582f..c364efe8 100644 --- a/libmemcached/memcached_do.c +++ b/libmemcached/memcached_do.c @@ -19,7 +19,7 @@ memcached_return memcached_do(memcached_server_st *ptr, const void *command, if (sent_length == -1 || (size_t)sent_length != command_length) rc= MEMCACHED_WRITE_FAILURE; - else + else if ((ptr->root->flags & MEM_NOREPLY) == 0) memcached_server_response_increment(ptr); return rc; diff --git a/libmemcached/memcached_storage.c b/libmemcached/memcached_storage.c index 4b626068..1f551b87 100644 --- a/libmemcached/memcached_storage.c +++ b/libmemcached/memcached_storage.c @@ -136,7 +136,6 @@ static inline memcached_return memcached_send(memcached_st *ptr, if (ptr->flags & MEM_NOREPLY) { - memcached_server_response_decrement(&ptr->hosts[server_key]); return (to_write == 0) ? MEMCACHED_BUFFERED : MEMCACHED_SUCCESS; } @@ -427,9 +426,6 @@ static memcached_return memcached_send_binary(memcached_server_st* server, return MEMCACHED_WRITE_FAILURE; } - if (noreply) - memcached_server_response_decrement(server); - if (flush == 0) return MEMCACHED_BUFFERED;