Commit e45ede49 authored by Simon Giesecke's avatar Simon Giesecke

Problem: regression introduced by 68d520ef, changing behaviour of unblocking sockets

Solution: move unblock call to original location
parent db8c26fc
...@@ -232,6 +232,9 @@ int zmq::socks_connecter_t::connect_to_proxy () ...@@ -232,6 +232,9 @@ int zmq::socks_connecter_t::connect_to_proxy ()
} }
zmq_assert (_addr->resolved.tcp_addr != NULL); zmq_assert (_addr->resolved.tcp_addr != NULL);
// Set the socket to non-blocking mode so that we get async connect().
unblock_socket (_s);
const tcp_address_t *const tcp_addr = _addr->resolved.tcp_addr; const tcp_address_t *const tcp_addr = _addr->resolved.tcp_addr;
int rc; int rc;
......
...@@ -429,9 +429,6 @@ zmq::fd_t zmq::tcp_open_socket (const char *address_, ...@@ -429,9 +429,6 @@ zmq::fd_t zmq::tcp_open_socket (const char *address_,
if (!options_.bound_device.empty ()) if (!options_.bound_device.empty ())
bind_to_device (s, options_.bound_device); bind_to_device (s, options_.bound_device);
// Set the socket to non-blocking mode so that we get async connect().
unblock_socket (s);
// Set the socket buffer limits for the underlying socket. // Set the socket buffer limits for the underlying socket.
if (options_.sndbuf >= 0) if (options_.sndbuf >= 0)
set_tcp_send_buffer (s, options_.sndbuf); set_tcp_send_buffer (s, options_.sndbuf);
......
...@@ -182,6 +182,9 @@ int zmq::tcp_connecter_t::open () ...@@ -182,6 +182,9 @@ int zmq::tcp_connecter_t::open ()
} }
zmq_assert (_addr->resolved.tcp_addr != NULL); zmq_assert (_addr->resolved.tcp_addr != NULL);
// Set the socket to non-blocking mode so that we get async connect().
unblock_socket (_s);
const tcp_address_t *const tcp_addr = _addr->resolved.tcp_addr; const tcp_address_t *const tcp_addr = _addr->resolved.tcp_addr;
int rc; int rc;
......
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