summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-10-30 18:20:43 +0100
committerBenoit Foucher <benoit@zeroc.com>2014-10-30 18:20:43 +0100
commita32ebea55b2af5443557238eb7fd30cd343c7b3e (patch)
tree0ca78eeccfc734c127227cb673a662bd1b170648 /cpp
parentRemoved old iml files (diff)
downloadice-a32ebea55b2af5443557238eb7fd30cd343c7b3e.tar.bz2
ice-a32ebea55b2af5443557238eb7fd30cd343c7b3e.tar.xz
ice-a32ebea55b2af5443557238eb7fd30cd343c7b3e.zip
Fixed ICE-5782: Fixed background test failure
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Ice/ConnectRequestHandler.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp
index 9395696563a..20fd886ee0d 100644
--- a/cpp/src/Ice/ConnectRequestHandler.cpp
+++ b/cpp/src/Ice/ConnectRequestHandler.cpp
@@ -65,7 +65,6 @@ ConnectRequestHandler::connect(const Ice::ObjectPrx& proxy)
}
catch(const Ice::LocalException&)
{
- proxy->__setRequestHandler(this, 0);
throw;
}
@@ -350,8 +349,12 @@ ConnectRequestHandler::setException(const Ice::LocalException& ex)
_proxies.clear();
_proxy = 0; // Break cyclic reference count.
- flushRequestsWithException();
-
+ //
+ // NOTE: remove the request handler *before* notifying the
+ // requests that the connection failed. It's important to ensure
+ // that future invocations will obtain a new connect request
+ // handler once invocations are notified.
+ //
try
{
_reference->getInstance()->requestHandlerFactory()->removeRequestHandler(_reference, this);
@@ -360,6 +363,8 @@ ConnectRequestHandler::setException(const Ice::LocalException& ex)
{
// Ignore
}
+
+ flushRequestsWithException();
notifyAll();
}
@@ -505,6 +510,7 @@ ConnectRequestHandler::flushRequests()
_initialized = true;
_flushing = false;
}
+
try
{
_reference->getInstance()->requestHandlerFactory()->removeRequestHandler(_reference, this);
@@ -513,6 +519,7 @@ ConnectRequestHandler::flushRequests()
{
// Ignore
}
+
_proxies.clear();
_proxy = 0; // Break cyclic reference count.
notifyAll();