From: Brian Aker Date: Tue, 14 Jun 2011 20:41:19 +0000 (-0700) Subject: Add in MSG_DONTWAIT for recv(). X-Git-Tag: 0.51~4^2~12 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=517d9f55399cbd61963e5cb9da6e733e6381b254;p=m6w6%2Flibmemcached Add in MSG_DONTWAIT for recv(). --- diff --git a/libmemcached/io.cc b/libmemcached/io.cc index aa7c0ccb..fd719d6e 100644 --- a/libmemcached/io.cc +++ b/libmemcached/io.cc @@ -182,7 +182,7 @@ static bool repack_input_buffer(memcached_server_write_instance_st ptr) ssize_t nr= recv(ptr->fd, ptr->read_ptr + ptr->read_data_length, MEMCACHED_MAX_BUFFER - ptr->read_data_length, - 0); + MSG_DONTWAIT); if (nr > 0) { @@ -261,7 +261,7 @@ memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr, do { - data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, 0); + data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, MSG_DONTWAIT); if (data_read == SOCKET_ERROR) {