unix: map ECONNABORTED

This commit is contained in:
Ben Noordhuis 2012-02-03 16:18:50 +01:00
parent 267e75dda2
commit 2f182f4451
2 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case EMSGSIZE: return UV_EMSGSIZE;
case ENAMETOOLONG: return UV_ENAMETOOLONG;
case EINVAL: return UV_EINVAL;
case ECONNABORTED: return UV_ECONNABORTED;
case ECONNREFUSED: return UV_ECONNREFUSED;
case EADDRINUSE: return UV_EADDRINUSE;
case EADDRNOTAVAIL: return UV_EADDRNOTAVAIL;

View File

@ -802,6 +802,8 @@ int uv__connect(uv_connect_t* req, uv_stream_t* stream, struct sockaddr* addr,
/* If we get a ECONNREFUSED wait until the next tick to report the
* error. Solaris wants to report immediately--other unixes want to
* wait.
*
* XXX: do the same for ECONNABORTED?
*/
case ECONNREFUSED:
stream->delayed_error = errno;