summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectRequestHandler.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-07-07 17:44:55 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-07-07 17:44:55 +0200
commitd62cdf3a6869a67e37e10af25d7121aedb127deb (patch)
treed7bbd9101245ae6af5eedefc17f66034e15b7ae1 /cpp/src/Ice/ConnectRequestHandler.cpp
parentFix for cpp xcodesdk test build failure (diff)
downloadice-d62cdf3a6869a67e37e10af25d7121aedb127deb.tar.bz2
ice-d62cdf3a6869a67e37e10af25d7121aedb127deb.tar.xz
ice-d62cdf3a6869a67e37e10af25d7121aedb127deb.zip
Fixed ICE-8237 - deadlock in ConnectRequestHandler
Diffstat (limited to 'cpp/src/Ice/ConnectRequestHandler.cpp')
-rw-r--r--cpp/src/Ice/ConnectRequestHandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp
index b201a5c1c30..285402b333a 100644
--- a/cpp/src/Ice/ConnectRequestHandler.cpp
+++ b/cpp/src/Ice/ConnectRequestHandler.cpp
@@ -170,12 +170,15 @@ ConnectRequestHandler::setConnection(const Ice::ConnectionIPtr& connection, bool
void
ConnectRequestHandler::setException(const Ice::LocalException& ex)
{
- Lock sync(*this);
- assert(!_initialized && !_exception);
- ICE_SET_EXCEPTION_FROM_CLONE(_exception, ex.ice_clone());
+ {
+ Lock sync(*this);
+ assert(!_initialized && !_exception);
+ ICE_SET_EXCEPTION_FROM_CLONE(_exception, ex.ice_clone());
- _proxies.clear();
- _proxy = 0; // Break cyclic reference count.
+ _proxies.clear();
+ _proxy = 0; // Break cyclic reference count.
+ notifyAll();
+ }
//
// NOTE: remove the request handler *before* notifying the
@@ -199,9 +202,7 @@ ConnectRequestHandler::setException(const Ice::LocalException& ex)
(*p)->invokeExceptionAsync();
}
}
-
_requests.clear();
- notifyAll();
}
void