From 75f8a93d49eab96bd2509713bb6da99b256a76e1 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 30 Apr 2015 11:12:08 +1000 Subject: [PATCH] Check for zero ret in read_socket_line --- src/ckpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ckpool.c b/src/ckpool.c index 5113fbfe..c4537d50 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -562,7 +562,7 @@ rewait: if (eom) break; /* Have we used up all the timeout yet? */ - if (timeout > 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) + if (timeout > 0 && (errno == EAGAIN || errno == EWOULDBLOCK || !ret)) goto rewait; if (cs->ckp->proxy) LOGINFO("Failed to recv in read_socket_line");