This reverts commit a87aed2. Causes an assertion failure: s != retired_fd (tcp_connecter.cpp:271)
Fixing LIBZMQ-411 - ZMQ 2.x compilation problems when building with disabled asserts. Styling cleanups. In file included from ../../tests/test_pair_inproc.cpp:21: ../../tests/testutil.hpp: In function ‘void zmqtestutil::basic_tests(const char*, int, int)’: ../../tests/testutil.hpp:114: error: unused variable ‘rc’ ../../tests/test_hwm.cpp: In function ‘int main(int, char**)’: ../../tests/test_hwm.cpp:47: error: unused variable ‘sent’ ../../tests/test_hwm.cpp:60: error: unused variable ‘received’ ../../tests/test_hwm.cpp:64: error: unused variable ‘sent’ Signed-off-by: Vitaliy Ivanov <email@example.com>
The connecter used EAGAIN to signal that the connection couldn't be completed immediately. But the same value was used by connect(2) to signal that it failed. This made it impossible for the connecter to distinguish between these conditions. The patch modifies the connecter to use EINPROGRESS value, as originally returned by connect(2). Another problem addressed by the patch is the situation when a connection could not be completed immediately with the IPC transport. The patch modifies the connecter so that it behaves similarly to TCP transport. Refs. https://zeromq.jira.com/browse/LIBZMQ-381
zmq_term can not safely be re-entered with pgm transport. Backport to 2.x of the fix proposed by Steven McCoy.