From: Brian Aker Date: Fri, 11 Feb 2011 22:13:03 +0000 (-0800) Subject: Merge in removal of setting infinite no_block X-Git-Tag: 0.51~43^2~10 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=813fb1ae11f915b3dbcb4f7a457261f9c377212a;p=awesomized%2Flibmemcached Merge in removal of setting infinite no_block --- 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) {