summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/RouterInfo.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-06-27 10:31:41 +0200
commita4f93259dc3494d98addf38e69b87eb557d432b3 (patch)
treed2b78bb5cea24e33dc1b46be22dba6167e96c9ed /cpp/src/Ice/RouterInfo.cpp
parentFix for ICE-5515 (ice_staticId on proxies) in Java, C#, Python, Ruby and PHP ... (diff)
downloadice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.bz2
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.xz
ice-a4f93259dc3494d98addf38e69b87eb557d432b3.zip
Better collocation optimization, fix for ICE-5489, ICE-5484
Diffstat (limited to 'cpp/src/Ice/RouterInfo.cpp')
-rw-r--r--cpp/src/Ice/RouterInfo.cpp45
1 files changed, 7 insertions, 38 deletions
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index 7632a10cbef..9a10be26618 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -157,29 +157,17 @@ IceInternal::RouterInfo::getClientEndpoints()
}
void
-IceInternal::RouterInfo::getClientProxyResponse(const Ice::ObjectPrx& proxy, const GetClientEndpointsCallbackPtr& callback)
+IceInternal::RouterInfo::getClientProxyResponse(const Ice::ObjectPrx& proxy,
+ const GetClientEndpointsCallbackPtr& callback)
{
callback->setEndpoints(setClientEndpoints(proxy));
}
void
-IceInternal::RouterInfo::getClientProxyException(const Ice::Exception& ex, const GetClientEndpointsCallbackPtr& callback)
+IceInternal::RouterInfo::getClientProxyException(const Ice::Exception& ex,
+ const GetClientEndpointsCallbackPtr& callback)
{
- if(dynamic_cast<const Ice::CollocationOptimizationException*>(&ex))
- {
- try
- {
- callback->setEndpoints(getClientEndpoints());
- }
- catch(const Ice::LocalException& e)
- {
- callback->setException(e);
- }
- }
- else
- {
- callback->setException(dynamic_cast<const Ice::LocalException&>(ex));
- }
+ callback->setException(dynamic_cast<const Ice::LocalException&>(ex));
}
void
@@ -248,22 +236,7 @@ IceInternal::RouterInfo::addProxyResponse(const Ice::ObjectProxySeq& proxies, co
void
IceInternal::RouterInfo::addProxyException(const Ice::Exception& ex, const AddProxyCookiePtr& cookie)
{
- if(dynamic_cast<const Ice::CollocationOptimizationException*>(&ex))
- {
- try
- {
- addProxy(cookie->proxy());
- cookie->cb()->addedProxy();
- }
- catch(const Ice::LocalException& e)
- {
- cookie->cb()->setException(e);
- }
- }
- else
- {
- cookie->cb()->setException(dynamic_cast<const Ice::LocalException&>(ex));
- }
+ cookie->cb()->setException(dynamic_cast<const Ice::LocalException&>(ex));
}
bool
@@ -336,14 +309,10 @@ IceInternal::RouterInfo::setClientEndpoints(const Ice::ObjectPrx& proxy)
// we must use the same timeout as the already existing
// connection.
//
- try
+ if(_router->ice_getConnection())
{
clientProxy = clientProxy->ice_timeout(_router->ice_getConnection()->timeout());
}
- catch(const Ice::CollocationOptimizationException&)
- {
- // Ignore - collocated router
- }
_clientEndpoints = clientProxy->__reference()->getEndpoints();
}