Commit dcf0693d authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #450 from hurtonm/issue_447

Resolve LIBZMQ-447
parents 19f77a1c 03deb2c9
......@@ -678,11 +678,6 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
return -1;
}
// Get the message.
int rc = xrecv (msg_, flags_);
if (unlikely (rc != 0 && errno != EAGAIN))
return -1;
// Once every inbound_poll_rate messages check for signals and process
// incoming commands. This happens only if we are not polling altogether
// because there are messages available all the time. If poll occurs,
......@@ -697,6 +692,11 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
ticks = 0;
}
// Get the message.
int rc = xrecv (msg_, flags_);
if (unlikely (rc != 0 && errno != EAGAIN))
return -1;
// If we have the message, return immediately.
if (rc == 0) {
extract_flags (msg_);
......
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