From: Yin Chen Date: Fri, 29 Aug 2008 06:33:04 +0000 (+0800) Subject: fix the incr/decr operation connection closed bug X-Git-Tag: 0.23~3^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6a9308726c72cb3df8a6fd8ac968f382d100a214;p=awesomized%2Flibmemcached fix the incr/decr operation connection closed bug --- diff --git a/libmemcached/memcached_response.c b/libmemcached/memcached_response.c index 2c178e49..f81f5154 100644 --- a/libmemcached/memcached_response.c +++ b/libmemcached/memcached_response.c @@ -81,6 +81,7 @@ memcached_return memcached_response(memcached_server_st *ptr, memcached_server_response_decrement(ptr); } + uint64_t auto_return_value= 0; switch(buffer[0]) { case 'V': /* VALUE || VERSION */ @@ -167,6 +168,8 @@ memcached_return memcached_response(memcached_server_st *ptr, memcached_io_reset(ptr); return MEMCACHED_CLIENT_ERROR; default: + if(sscanf(buffer, "%lld", &auto_return_value) == 1) + return MEMCACHED_SUCCESS; memcached_io_reset(ptr); return MEMCACHED_UNKNOWN_READ_FAILURE;