From 197ea03f8f917664d41b63438a38790b4606baf7 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Thu, 14 Jun 2018 12:41:21 -0500 Subject: [PATCH] Minor optimization to bro_broker::Manager::FlushPendingQueries --- src/broker/Manager.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/broker/Manager.cc b/src/broker/Manager.cc index f18d245bb0..3a980d22c2 100644 --- a/src/broker/Manager.cc +++ b/src/broker/Manager.cc @@ -241,8 +241,17 @@ void Manager::FlushPendingQueries() { // possibly an infinite loop if a query can recursively // generate more queries... - Process(); + for ( auto& s : data_stores ) + { + while ( ! s.second->proxy.mailbox().empty() ) + { + auto response = s.second->proxy.receive(); + ProcessStoreResponse(s.second, move(response)); + } + } } + + SetIdle(false); } uint16_t Manager::Listen(const string& addr, uint16_t port)