diff options
Diffstat (limited to 'cpp/src/Ice/RouterInfo.cpp')
-rw-r--r-- | cpp/src/Ice/RouterInfo.cpp | 45 |
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(); } |