From 813fb1ae11f915b3dbcb4f7a457261f9c377212a Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 11 Feb 2011 14:13:03 -0800 Subject: [PATCH] Merge in removal of setting infinite no_block --- libmemcached/connect.c | 6 +----- libmemcached/io.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/libmemcached/connect.c b/libmemcached/connect.c index 75d174b4..3afef7d3 100644 --- a/libmemcached/connect.c +++ b/libmemcached/connect.c @@ -19,16 +19,12 @@ static memcached_return_t connect_poll(memcached_server_st *ptr) fds[0].fd = ptr->fd; fds[0].events = POLLOUT; - int timeout= ptr->root->connect_timeout; - if (ptr->root->flags.no_block == true) - timeout= -1; - int error; size_t loop_max= 5; while (--loop_max) // Should only loop on cases of ERESTART or EINTR { - error= poll(fds, 1, timeout); + error= poll(fds, 1, ptr->root->connect_timeout); switch (error) { diff --git a/libmemcached/io.c b/libmemcached/io.c index 17de8572..efb0efad 100644 --- a/libmemcached/io.c +++ b/libmemcached/io.c @@ -55,14 +55,10 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr, return MEMCACHED_FAILURE; } - int timeout= ptr->root->poll_timeout; - if (ptr->root->flags.no_block == false) - timeout= -1; - size_t loop_max= 5; while (--loop_max) // While loop is for ERESTART or EINTR { - error= poll(&fds, 1, timeout); + error= poll(&fds, 1, ptr->root->poll_timeout); switch (error) { -- 2.30.2