Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10744: wrong error code when doing async_connect and the connection is refused
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-09 13:41:54
#10744: wrong error code when doing async_connect and the connection is refused
-------------------------------------+-------------------------------------
Reporter: Martin Bonetti | Owner: chris_kohlhoff
<martin.bonetti@â¦> | Status: new
Type: Bugs | Component: asio
Milestone: To Be Determined | Severity: Regression
Version: Boost 1.56.0 | Keywords: errror_code,
Resolution: | async_connect
-------------------------------------+-------------------------------------
Comment (by hvemha@â¦):
This related to the errors from ConnectEx and not the use of GetLastError
or WSAGetLastError.
After some testing, I found that ConnectEx will give:[[BR]]
ERROR_NETWORK_UNREACHABLE instead of WSAENETUNREACH[[BR]]
ERROR_HOST_UNREACHABLE instead of WSAEHOSTUNREACH[[BR]]
ERROR_CONNECTION_REFUSED instead of WSAECONNREFUSED[[BR]]
ERROR_SEM_TIMEOUT instead of WSAETIMEDOUT[[BR]]
The best solution is probably to map these errors to the portable codes in
win_iocp_socket_connect_op::do_complete
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10744#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC