unix: ignore ECONNABORTED errors from accept()

ECONNABORTED means that the connection was torn down by the peer before the
TCP handshake completed. Ignore it, there's nothing we can do and it simplifies
error handling for libuv users.
This commit is contained in:
Ben Noordhuis 2012-03-21 07:07:18 -07:00 committed by isaacs
parent 4ae316bcc9
commit 8409a6765b

View File

@ -182,6 +182,9 @@ void uv__server_io(EV_P_ ev_io* watcher, int revents) {
} else if (errno == EMFILE) {
/* TODO special trick. unlock reserved socket, accept, close. */
return;
} else if (errno == ECONNABORTED) {
/* ignore */
continue;
} else {
uv__set_sys_error(stream->loop, errno);
stream->connection_cb((uv_stream_t*)stream, -1);