summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-09-29 11:17:22 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-09-29 11:17:22 +0200
commitdb3585813845bdd17d9ee3c7d5a4828a82e03f4b (patch)
tree660c77fde31f6656a2b76720df4f75b7eb1adbf4 /cpp
parent- begin_ now never interrupts. (diff)
downloadice-db3585813845bdd17d9ee3c7d5a4828a82e03f4b.tar.bz2
ice-db3585813845bdd17d9ee3c7d5a4828a82e03f4b.tar.xz
ice-db3585813845bdd17d9ee3c7d5a4828a82e03f4b.zip
Improved fix for ICE-5693 and update of request handler
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Ice/ConnectRequestHandler.cpp5
-rw-r--r--cpp/src/Ice/Proxy.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp
index 7a6b495a13f..5a9a84c83b1 100644
--- a/cpp/src/Ice/ConnectRequestHandler.cpp
+++ b/cpp/src/Ice/ConnectRequestHandler.cpp
@@ -92,11 +92,10 @@ RequestHandlerPtr
ConnectRequestHandler::connect()
{
Ice::ObjectPrx proxy = _proxy;
-
- _reference->getConnection(this);
-
try
{
+ _reference->getConnection(this);
+
Lock sync(*this);
if(!initialized())
{
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp
index 2d7ef940fa7..f455f5e6361 100644
--- a/cpp/src/Ice/Proxy.cpp
+++ b/cpp/src/Ice/Proxy.cpp
@@ -1644,10 +1644,10 @@ void
IceProxy::Ice::Object::__setRequestHandler(const ::IceInternal::RequestHandlerPtr& previous,
const ::IceInternal::RequestHandlerPtr& handler)
{
- if(_reference->getCacheConnection())
+ if(_reference->getCacheConnection() && previous)
{
IceUtil::Mutex::Lock sync(_mutex);
- if(_requestHandler.get() != handler.get())
+ if(_requestHandler && _requestHandler.get() != handler.get())
{
//
// Update the request handler only if "previous" is the same