Skip to content

Commit

Permalink
ENHANCE: Enhance do.cc naver#167
Browse files Browse the repository at this point in the history
  • Loading branch information
uhm0311 committed Dec 28, 2021
1 parent eb00672 commit abc3003
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libmemcached/do.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const void *command,
size_t command_length, bool with_flush)
{
memcached_return_t rc;
memcached_return_t rc= MEMCACHED_SUCCESS;
ssize_t sent_length;

WATCHPOINT_ASSERT(command_length);
Expand Down Expand Up @@ -58,8 +58,10 @@ memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const vo
if (sent_length == -1 || (size_t)sent_length != command_length)
{
rc= MEMCACHED_WRITE_FAILURE;
return rc;
}
else if ((ptr->root->flags.no_reply) == 0)

if ((ptr->root->flags.no_reply) == 0)
{
memcached_server_response_increment(ptr);
}
Expand All @@ -71,7 +73,7 @@ memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
const struct libmemcached_io_vector_st *vector, size_t count,
bool with_flush)
{
memcached_return_t rc;
memcached_return_t rc= MEMCACHED_SUCCESS;
ssize_t sent_length;

WATCHPOINT_ASSERT(count);
Expand Down Expand Up @@ -107,8 +109,10 @@ memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
rc= MEMCACHED_WRITE_FAILURE;
WATCHPOINT_ERROR(rc);
WATCHPOINT_ERRNO(errno);
return rc;
}
else if ((ptr->root->flags.no_reply) == 0 and (ptr->root->flags.piped == false))

if ((ptr->root->flags.no_reply) == 0 and (ptr->root->flags.piped == false))
{
memcached_server_response_increment(ptr);
}
Expand Down

0 comments on commit abc3003

Please sign in to comment.