diff options
author | Martin Sustrik <sustrik@fastmq.com> | 2009-09-09 10:08:46 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@fastmq.com> | 2009-09-09 10:08:46 +0200 |
commit | 4d07d7cabe1a865812cf5d95a84557880e3c3096 (patch) | |
tree | 1fcf0b6117bb5e489605fd022928e21c38d07e14 | |
parent | c99f39abc669084fd3a94675ee98e235448ad5a4 (diff) |
fix of async connect on win32
-rw-r--r-- | src/tcp_connecter.cpp | 4 | ||||
-rw-r--r-- | src/zmq_connecter.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index 22caafb..7058648 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -180,8 +180,10 @@ int zmq::tcp_connecter_t::open () return 0; // Asynchronous connect was launched. - if (rc == -1 && errno == EINPROGRESS) + if (rc == -1 && errno == EINPROGRESS) { + errno = EAGAIN; return -1; + } // Error occured. int err = errno; diff --git a/src/zmq_connecter.cpp b/src/zmq_connecter.cpp index 1ab4a14..be88bff 100644 --- a/src/zmq_connecter.cpp +++ b/src/zmq_connecter.cpp @@ -100,7 +100,7 @@ void zmq::zmq_connecter_t::start_connecting () } // 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_valid = true; set_pollout (handle); |