Browse Source

Pass select timed out return of zero in read_socket_line

master
Con Kolivas 9 years ago
parent
commit
47ecddf88a
  1. 6
      src/ckpool.c

6
src/ckpool.c

@ -706,11 +706,11 @@ int read_socket_line(connsock_t *cs, float *timeout)
goto out; goto out;
} }
ret = wait_read_select(cs->fd, *timeout); ret = wait_read_select(cs->fd, *timeout);
if (ret < 0) { if (ret < 1) {
if (cs->ckp->proxy) if (cs->ckp->proxy)
LOGINFO("Select failed in read_socket_line"); LOGINFO("Select %s in read_socket_line", !ret ? "timed out" : "failed");
else else
LOGERR("Select failed in read_socket_line"); LOGERR("Select %s in read_socket_line", !ret ? "timed out" : "failed");
goto out; goto out;
} }
ret = recv(cs->fd, readbuf, PAGESIZE - 4, MSG_DONTWAIT); ret = recv(cs->fd, readbuf, PAGESIZE - 4, MSG_DONTWAIT);

Loading…
Cancel
Save