Commit 82012667 authored by Martin Sustrik's avatar Martin Sustrik

Deadlock on zmq_close

parent 9f495942
......@@ -78,10 +78,13 @@ uint64_t zmq::fd_signaler_t::poll ()
ssize_t sz;
while (true) {
sz = read (fd, &signals, sizeof (uint64_t));
if (sz == 0 || (errno != EAGAIN && errno != EINTR))
break;
if (sz == -1) {
if (errno == EAGAIN || errno == EINTR)
continue;
zmq_assert (false);
}
break;
}
errno_assert (sz != -1);
// Set to non-blocking mode.
rc = fcntl (fd, F_SETFL, flags | O_NONBLOCK);
......
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