Commit bd07baf0 authored by Martin Sustrik's avatar Martin Sustrik

ZMQII-33: zmq_poll may exceed timeout if signal interrupts the waiting

parent e806615d
......@@ -334,7 +334,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// already be signaled on 0MQ sockets.
int rc = poll (pollfds, npollfds, initial ? 0 : timeout);
if (rc == -1 && errno == EINTR)
continue;
break;
errno_assert (rc >= 0);
// If timeout was hit with no events signaled, return zero.
......@@ -453,7 +453,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
wsa_assert (rc != SOCKET_ERROR);
#else
if (rc == -1 && errno == EINTR)
continue;
break;
#endif
errno_assert (rc >= 0);
......
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