[zeromq-dev] Problem with blocking recv in V.3.0

Martin Sustrik sustrik at 250bpm.com
Tue Jul 19 17:13:44 CEST 2011


Hi Peter,

> In "signaler.cpp":
> @@ -176,11 +176,11 @@ int zmq::signaler_t::wait (int timeout_)
> FD_SET (r, &fds);
> struct timeval timeout;
> timeout.tv_sec = timeout_ / 1000;
> timeout.tv_usec = timeout_ % 1000 * 1000;
> #ifdef ZMQ_HAVE_WINDOWS
> - int rc = select (0, &fds, NULL, NULL, &timeout);
> + int rc = select (0, &fds, NULL, NULL, timeout_ < 0 ? NULL : &timeout);
> wsa_assert (rc != SOCKET_ERROR);
> #else
> int rc = select (r + 1, &fds, NULL, NULL, &timeout);
> if (unlikely (rc < 0)) {
> zmq_assert (errno == EINTR);

Actually, this bug have been already fixed in 3.0 (commit 
d846c679e9e480eb29aa) and it will be incorporated into the next release.

Till then you can use the version of 0mq from github zeromq3-0 repo.

Martin



More information about the zeromq-dev mailing list