mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-15 15:16:52 +02:00
Merge branch 'master' into events
This commit is contained in:
@@ -144,7 +144,7 @@ void zmq::tcp_connecter_t::start_connecting ()
|
||||
}
|
||||
|
||||
// Connection establishment may be delayed. Poll for its completion.
|
||||
else if (rc == -1 && errno == EAGAIN) {
|
||||
else if (rc == -1 && errno == EINPROGRESS) {
|
||||
handle = add_fd (s);
|
||||
handle_valid = true;
|
||||
set_pollout (handle);
|
||||
@@ -218,17 +218,18 @@ int zmq::tcp_connecter_t::open ()
|
||||
if (rc == 0)
|
||||
return 0;
|
||||
|
||||
// Asynchronous connect was launched.
|
||||
// Translate other error codes indicating asynchronous connect has been
|
||||
// launched to a uniform EINPROGRESS.
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
if (rc == SOCKET_ERROR && (WSAGetLastError () == WSAEINPROGRESS ||
|
||||
WSAGetLastError () == WSAEWOULDBLOCK)) {
|
||||
errno = EAGAIN;
|
||||
errno = EINPROGRESS;
|
||||
return -1;
|
||||
}
|
||||
wsa_error_to_errno ();
|
||||
#else
|
||||
if (rc == -1 && errno == EINPROGRESS) {
|
||||
errno = EAGAIN;
|
||||
if (rc == -1 && errno == EINTR) {
|
||||
errno = EINPROGRESS;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user