fix regression from recent refactor that causes infinite loop on unexpected disconnect
This commit is contained in:
parent
c07a6b6b9e
commit
ca8f121977
|
@ -1231,8 +1231,9 @@ static esl_ssize_t handle_recv(esl_handle_t *handle, void *data, esl_size_t data
|
|||
if ((activity & ESL_POLL_ERROR)) {
|
||||
activity = -1;
|
||||
} else if ((activity & ESL_POLL_READ)) {
|
||||
activity = recv(handle->sock, data, datalen, 0);
|
||||
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
if (!(activity = recv(handle->sock, data, datalen, 0))) {
|
||||
activity = -1;
|
||||
} else if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||
activity = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue