|
|
@ -110,11 +110,8 @@ retry: |
|
|
|
buflen = PAGESIZE - client->bufofs; |
|
|
|
buflen = PAGESIZE - client->bufofs; |
|
|
|
ret = recv(client->fd, client->buf + client->bufofs, buflen, MSG_DONTWAIT); |
|
|
|
ret = recv(client->fd, client->buf + client->bufofs, buflen, MSG_DONTWAIT); |
|
|
|
if (ret < 1) { |
|
|
|
if (ret < 1) { |
|
|
|
/* If we're reading on the first pass, there is supposed to be
|
|
|
|
/* Nothing else ready to be read */ |
|
|
|
* data waiting for us according to poll() so no data implies |
|
|
|
if (!ret) |
|
|
|
* a lost connection. On repeat reads may have just read all |
|
|
|
|
|
|
|
* the data */ |
|
|
|
|
|
|
|
if (moredata) |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
LOGINFO("Client fd %d disconnected", client->fd); |
|
|
|
LOGINFO("Client fd %d disconnected", client->fd); |
|
|
|