From 47ecddf88a4c0b5d10710e502c64795a77937364 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 4 Jan 2016 10:48:46 +1100 Subject: [PATCH] Pass select timed out return of zero in read_socket_line --- src/ckpool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ckpool.c b/src/ckpool.c index 3f8e4aab..358054b2 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -706,11 +706,11 @@ int read_socket_line(connsock_t *cs, float *timeout) goto out; } ret = wait_read_select(cs->fd, *timeout); - if (ret < 0) { + if (ret < 1) { if (cs->ckp->proxy) - LOGINFO("Select failed in read_socket_line"); + LOGINFO("Select %s in read_socket_line", !ret ? "timed out" : "failed"); else - LOGERR("Select failed in read_socket_line"); + LOGERR("Select %s in read_socket_line", !ret ? "timed out" : "failed"); goto out; } ret = recv(cs->fd, readbuf, PAGESIZE - 4, MSG_DONTWAIT);