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

Solution: move unblock call to original location
This commit is contained in:
Simon Giesecke 2019-02-07 11:02:57 +01:00
parent db8c26fce3
commit e45ede49b5
3 changed files with 6 additions and 3 deletions

View File

@ -232,6 +232,9 @@ int zmq::socks_connecter_t::connect_to_proxy ()
}
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;
int rc;

View File

@ -429,9 +429,6 @@ zmq::fd_t zmq::tcp_open_socket (const char *address_,
if (!options_.bound_device.empty ())
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.
if (options_.sndbuf >= 0)
set_tcp_send_buffer (s, options_.sndbuf);

View File

@ -182,6 +182,9 @@ int zmq::tcp_connecter_t::open ()
}
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;
int rc;