Don't wait for a signal if the dispatch queue is non-empty already, and support a non-NULL pipe for local responses. If we were to require pipe to be NULL for that, the response would be lost. Signed-off-by: Alexandre Oliva <oliva@xxxxxxxxxxxxxxxxx> --- src/msg/SimpleMessenger.cc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 53e36cd..973219f 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -373,7 +373,7 @@ void SimpleMessenger::DispatchQueue::entry() } lock.Lock(); } - if (!stop) + if (queued_pipes.empty() && !stop) cond.Wait(lock); //wait for something to be put on queue } lock.Unlock(); @@ -2477,7 +2477,7 @@ void SimpleMessenger::submit_message(Message *m, Connection *con, const entity_a } // local? - if (!pipe && my_inst.addr == dest_addr) { + if (my_inst.addr == dest_addr) { if (!destination_stopped) { // local ldout(cct,20) << "submit_message " << *m << " local" << dendl; -- 1.7.7.6 -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist Red Hat Brazil Compiler Engineer -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html