summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-05-07 11:08:50 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-05-07 11:08:50 +0200
commit4a3b857c4cf35261751d562ad7e4acc5ecf58be0 (patch)
treee342f007661788b7374e162790a96a251d6cf3a3
parent36b044a0d5a9918841839edf12767b31bfec36a0 (diff)
commands not processed immediatelly in some scenarios; fixed
-rw-r--r--src/app_thread.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app_thread.cpp b/src/app_thread.cpp
index 19f997b..fbf034c 100644
--- a/src/app_thread.cpp
+++ b/src/app_thread.cpp
@@ -123,9 +123,11 @@ bool zmq::app_thread_t::process_commands (bool block_, bool throttle_)
received = signaler.recv (&cmd, false);
}
- // Process the command, if any.
- if (received)
+ // Process all the commands available at the moment.
+ while (received) {
cmd.destination->process_command (cmd);
+ received = signaler.recv (&cmd, false);
+ }
return !terminated;
}