summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 7ff3f57db4b..5d03c88f4f4 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -777,7 +777,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
// If the handler called ioCompleted(), we re-enable the handler in
// case it was disabled and we decrease the number of thread in use.
//
- if(_serialize)
+ if(_serialize && current._handler.get() != _workQueue.get())
{
_selector.enable(current._handler.get(), current.operation);
if(current._handler->_hasMoreData && current._handler->_registered & SocketOperationRead)
@@ -1004,7 +1004,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current)
if(!_destroyed)
{
- if(_serialize)
+ if(_serialize && current._handler.get() != _workQueue.get())
{
_selector.disable(current._handler.get(), current.operation);
@@ -1079,7 +1079,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current)
}
}
- return _serialize;
+ return _serialize && current._handler.get() != _workQueue.get();
}
#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT)