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
parent 8ce8bfaa40
commit c9c9d805da

View File

@ -185,6 +185,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);