From 4a3b857c4cf35261751d562ad7e4acc5ecf58be0 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 7 May 2010 11:08:50 +0200 Subject: commands not processed immediatelly in some scenarios; fixed --- src/app_thread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3