Commit 4d07d7ca authored by Martin Sustrik's avatar Martin Sustrik

fix of async connect on win32

parent c99f39ab
...@@ -180,8 +180,10 @@ int zmq::tcp_connecter_t::open () ...@@ -180,8 +180,10 @@ int zmq::tcp_connecter_t::open ()
return 0; return 0;
// Asynchronous connect was launched. // Asynchronous connect was launched.
if (rc == -1 && errno == EINPROGRESS) if (rc == -1 && errno == EINPROGRESS) {
errno = EAGAIN;
return -1; return -1;
}
// Error occured. // Error occured.
int err = errno; int err = errno;
......
...@@ -100,7 +100,7 @@ void zmq::zmq_connecter_t::start_connecting () ...@@ -100,7 +100,7 @@ void zmq::zmq_connecter_t::start_connecting ()
} }
// Connection establishment may be dealyed. Poll for its completion. // Connection establishment may be dealyed. Poll for its completion.
else if (rc == -1 && errno == EINPROGRESS) { else if (rc == -1 && errno == EAGAIN) {
handle = add_fd (tcp_connecter.get_fd ()); handle = add_fd (tcp_connecter.get_fd ());
handle_valid = true; handle_valid = true;
set_pollout (handle); set_pollout (handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment