mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-06 21:56:25 +01:00
Problem: zmq_poller_* uses ETIMEDOUT (instead of the usual EAGAIN) to indicate timeouts
Solution: replace ETIMEDOUT within socket_poller_t and all client code by EAGAIN Fixes #2713
This commit is contained in:
@@ -271,13 +271,13 @@ int zmq::proxy (
|
||||
// If one of receiving end's queue is full ('ZMQ_POLLOUT' not available),
|
||||
// 'poller_wait' is pointed to 'poller_receive_blocked', 'poller_send_blocked' or 'poller_both_blocked'.
|
||||
rc = poller_wait->wait (events, 3, -1);
|
||||
if (rc < 0 && errno == ETIMEDOUT)
|
||||
if (rc < 0 && errno == EAGAIN)
|
||||
rc = 0;
|
||||
CHECK_RC_EXIT_ON_FAILURE ();
|
||||
|
||||
// Some of events waited for by 'poller_wait' have arrived, now poll for everything without blocking.
|
||||
rc = poller_all->wait (events, 3, 0);
|
||||
if (rc < 0 && errno == ETIMEDOUT)
|
||||
if (rc < 0 && errno == EAGAIN)
|
||||
rc = 0;
|
||||
CHECK_RC_EXIT_ON_FAILURE ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user