From 6a50ea5b6b2869925172a68bd3337f2f6832b8b5 Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 21 Jul 2014 11:16:00 +0200 Subject: Fixed race condition which could cause request to be dispatched even if the connection was just put on hold --- cpp/src/Ice/ThreadPool.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpp/src/Ice/ThreadPool.h') diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index d8e0b85dcd1..b7dcbf3cf42 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -188,6 +188,11 @@ public: { _threadPool->finishMessage(const_cast(*this)); } +#else + bool ioReady() + { + return _handler->_registered & operation; + } #endif void dispatchFromThisThread(const DispatchWorkItemPtr& workItem) @@ -276,7 +281,7 @@ public: operator bool() { - return true; + return _message._current.ioReady(); // Ensure the handler is still interested in the operation. } void completed() -- cgit v1.2.3