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