From 1edcd9ed6c17ce48309dec3751e026ec2d9bc3f5 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 10 Aug 2014 09:28:18 +1000 Subject: [PATCH] If we're not checking the errno on failed select we should not be looping in wait_read/write select --- src/libckpool.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/libckpool.c b/src/libckpool.c index 57a66d78..dd0bd1c4 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -610,17 +610,13 @@ int wait_read_select(int sockd, int timeout) { tv_t tv_timeout; fd_set readfs; - int ret; tv_timeout.tv_sec = timeout; tv_timeout.tv_usec = 0; FD_ZERO(&readfs); FD_SET(sockd, &readfs); - do { - ret = select(sockd + 1, &readfs, NULL, NULL, &tv_timeout); - } while (unlikely(ret < 0)); - return ret; + return select(sockd + 1, &readfs, NULL, NULL, &tv_timeout); } int read_length(int sockd, void *buf, int len) @@ -688,17 +684,13 @@ int wait_write_select(int sockd, int timeout) { tv_t tv_timeout; fd_set writefds; - int ret; tv_timeout.tv_sec = timeout; tv_timeout.tv_usec = 0; FD_ZERO(&writefds); FD_SET(sockd, &writefds); - do { - ret = select(sockd + 1, NULL, &writefds, NULL, &tv_timeout); - } while (unlikely(ret < 0)); - return ret; + return select(sockd + 1, NULL, &writefds, NULL, &tv_timeout); } int write_length(int sockd, const void *buf, int len)