diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.cpp | 19 | ||||
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.h | 1 | ||||
-rw-r--r-- | cpp/src/Ice/SelectorThread.cpp | 10 |
3 files changed, 12 insertions, 18 deletions
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index a3ffbd85550..7556aaee266 100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp @@ -203,16 +203,19 @@ bool Glacier2::RequestQueue::addRequest(const RequestPtr& request) { IceUtil::Mutex::Lock lock(*this); - for(vector<RequestPtr>::iterator p = _requests.begin(); p != _requests.end(); ++p) + if(request->hasOverride()) { - // - // If the new request overrides an old one, then abort the old - // request and replace it with the new request. - // - if(request->override(*p)) + for(vector<RequestPtr>::iterator p = _requests.begin(); p != _requests.end(); ++p) { - *p = request; - return true; + // + // If the new request overrides an old one, then abort the old + // request and replace it with the new request. + // + if(request->override(*p)) + { + *p = request; + return true; + } } } diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h index dfc21b7d5e3..e91aa46e48b 100644 --- a/cpp/src/Glacier2/RequestQueue.h +++ b/cpp/src/Glacier2/RequestQueue.h @@ -33,6 +33,7 @@ public: bool invoke(); bool override(const RequestPtr&) const; const Ice::ObjectPrx& getProxy() const { return _proxy; } + bool hasOverride() const { return !_override.empty(); } private: diff --git a/cpp/src/Ice/SelectorThread.cpp b/cpp/src/Ice/SelectorThread.cpp index 0045abf2cf9..6be73b316e5 100644 --- a/cpp/src/Ice/SelectorThread.cpp +++ b/cpp/src/Ice/SelectorThread.cpp @@ -261,11 +261,6 @@ IceInternal::SelectorThread::HelperThread::HelperThread(const SelectorThreadPtr& void IceInternal::SelectorThread::HelperThread::run() { - if(_selectorThread->_instance->initializationData().threadHook) - { - _selectorThread->_instance->initializationData().threadHook->start(); - } - try { _selectorThread->run(); @@ -281,10 +276,5 @@ IceInternal::SelectorThread::HelperThread::run() out << "unknown exception in selector thread"; } - if(_selectorThread->_instance->initializationData().threadHook) - { - _selectorThread->_instance->initializationData().threadHook->stop(); - } - _selectorThread = 0; // Break cyclic dependency. } |