summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--src/socket_base.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index de72c85..9536db8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -20,6 +20,7 @@ Ivo Danihelka <ivo@danihelka.net>
Joe Thornber <joe.thornber@gmail.com>
Jon Dyte <jon@totient.co.uk>
Kamil Shakirov <kamils80@gmail.com>
+Marc Rossi <mrossi19@gmail.com>
Martin Hurton <hurtonm@gmail.com>
Martin Lucina <mato@kotelna.sk>
Martin Sustrik <sustrik@250bpm.com>
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index c933954..344b552 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -437,15 +437,17 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
// In blocking scenario, commands are processed over and over again until
// we are able to fetch a message.
+ bool block = (ticks != 0);
while (rc != 0) {
if (errno != EAGAIN)
return -1;
- if (unlikely (!app_thread->process_commands (true, false))) {
+ if (unlikely (!app_thread->process_commands (block, false))) {
errno = ETERM;
return -1;
}
rc = xrecv (msg_, flags_);
ticks = 0;
+ block = true;
}
rcvmore = msg_->flags & ZMQ_MSG_MORE;