Browse Source

Handle other forms of read_socket_line ending after message complete as not a failure

master
Con Kolivas 10 years ago
parent
commit
a0753a3965
  1. 6
      src/ckpool.c

6
src/ckpool.c

@ -419,9 +419,9 @@ int read_socket_line(connsock_t *cs, const int timeout)
char *newbuf; char *newbuf;
ret = wait_read_select(fd, eom ? 0 : timeout); ret = wait_read_select(fd, eom ? 0 : timeout);
if (eom && !ret)
break;
if (ret < 1) { if (ret < 1) {
if (eom)
break;
if (!ret) if (!ret)
LOGDEBUG("Select timed out in read_socket_line"); LOGDEBUG("Select timed out in read_socket_line");
else else
@ -431,7 +431,7 @@ int read_socket_line(connsock_t *cs, const int timeout)
ret = recv(fd, readbuf, PAGESIZE - 4, 0); ret = recv(fd, readbuf, PAGESIZE - 4, 0);
if (ret < 1) { if (ret < 1) {
/* Closed socket after valid message */ /* Closed socket after valid message */
if (!ret && eom) if (eom)
break; break;
LOGERR("Failed to recv in read_socket_line"); LOGERR("Failed to recv in read_socket_line");
ret = -1; ret = -1;

Loading…
Cancel
Save