Browse Source

Cope with a socket line that is closed at the end of the message

master
Con Kolivas 10 years ago
parent
commit
75f24a5d16
  1. 3
      src/ckpool.c

3
src/ckpool.c

@ -428,6 +428,9 @@ 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 */
if (!ret && eom)
break;
LOGERR("Failed to recv in read_socket_line"); LOGERR("Failed to recv in read_socket_line");
ret = -1; ret = -1;
goto out; goto out;

Loading…
Cancel
Save