diff options
-rw-r--r-- | lib/async_req/async_sock.c | 4 | ||||
-rw-r--r-- | source3/lib/util_sock.c | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index 46ad29d053..02ae880683 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -116,10 +116,10 @@ bool async_req_is_errno(struct async_req *req, int *err) *err = (int)error; break; case ASYNC_REQ_TIMED_OUT: -#ifdef HAVE_ETIMEDOUT +#ifdef ETIMEDOUT *err = ETIMEDOUT; #else - *err = EIO; + *err = EAGAIN; #endif break; case ASYNC_REQ_NO_MEMORY: diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index b9a7f8788d..c46aa2ac49 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1061,10 +1061,13 @@ static void open_socket_out_connected(struct async_req *subreq) return; } - if ((sys_errno == ETIME) - || (sys_errno == EINPROGRESS) - || (sys_errno == EALREADY) - || (sys_errno == EAGAIN)) { + if ( +#ifdef ETIMEDOUT + (sys_errno == ETIMEDOUT) || +#endif + (sys_errno == EINPROGRESS) || + (sys_errno == EALREADY) || + (sys_errno == EAGAIN)) { /* * retry |