Repository: drill Updated Branches: refs/heads/master d43324f89 -> 3b190762d
DRILL-2928: C++ client - io_service needs to be reset after running out of work Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/68bc1162 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/68bc1162 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/68bc1162 Branch: refs/heads/master Commit: 68bc1162794957d44c09f6da29449cbc7b52ae67 Parents: d43324f Author: Parth Chandra <pchan...@maprtech.com> Authored: Thu Apr 30 16:12:18 2015 -0700 Committer: Parth Chandra <pchan...@maprtech.com> Committed: Tue May 5 17:40:12 2015 -0700 ---------------------------------------------------------------------- contrib/native/client/src/clientlib/drillClientImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/68bc1162/contrib/native/client/src/clientlib/drillClientImpl.cpp ---------------------------------------------------------------------- diff --git a/contrib/native/client/src/clientlib/drillClientImpl.cpp b/contrib/native/client/src/clientlib/drillClientImpl.cpp index a253829..5bbbeb8 100644 --- a/contrib/native/client/src/clientlib/drillClientImpl.cpp +++ b/contrib/native/client/src/clientlib/drillClientImpl.cpp @@ -411,6 +411,10 @@ DrillClientQueryResult* DrillClientImpl::SubmitQuery(::exec::shared::QueryType t { if(this->m_pListenerThread==NULL){ // Stopping the io_service from running out-of-work + if(m_io_service.stopped()){ + DRILL_LOG(LOG_DEBUG) << "DrillClientImpl::SubmitQuery: io_service is stopped. Restarting." <<std::endl; + m_io_service.reset(); + } this->m_pWork = new boost::asio::io_service::work(m_io_service); this->m_pListenerThread = new boost::thread(boost::bind(&boost::asio::io_service::run, &this->m_io_service));