From 517d9f55399cbd61963e5cb9da6e733e6381b254 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 14 Jun 2011 13:41:19 -0700 Subject: [PATCH] Add in MSG_DONTWAIT for recv(). --- libmemcached/io.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.30.2