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:
sigiesec
2017-08-22 20:00:29 +02:00
parent 6a3c053a3e
commit a71f7b0405
4 changed files with 11 additions and 13 deletions

View File

@@ -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 ();