fix regression from recent refactor that causes infinite loop on unexpected disconnect
This commit is contained in:
parent
728722ce90
commit
eed2a7aa86
|
@ -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)) {
|
if ((activity & ESL_POLL_ERROR)) {
|
||||||
activity = -1;
|
activity = -1;
|
||||||
} else if ((activity & ESL_POLL_READ)) {
|
} else if ((activity & ESL_POLL_READ)) {
|
||||||
activity = recv(handle->sock, data, datalen, 0);
|
if (!(activity = recv(handle->sock, data, datalen, 0))) {
|
||||||
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
|
activity = -1;
|
||||||
|
} else if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||||
activity = 0;
|
activity = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue