summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ProxyFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ProxyFactory.cpp')
-rw-r--r--cpp/src/Ice/ProxyFactory.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/cpp/src/Ice/ProxyFactory.cpp b/cpp/src/Ice/ProxyFactory.cpp
index 67f6c695ced..d758934f9cd 100644
--- a/cpp/src/Ice/ProxyFactory.cpp
+++ b/cpp/src/Ice/ProxyFactory.cpp
@@ -90,19 +90,31 @@ IceInternal::ProxyFactory::referenceToProxy(const ReferencePtr& ref) const
void
IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, const ReferencePtr& ref, int& cnt) const
{
- //
- // We retry ObjectNotExistException if the reference is
- // indirect. Otherwise, we don't retry other *NotExistException,
- // which are all derived from RequestFailedException.
- //
if(dynamic_cast<const ObjectNotExistException*>(&ex))
{
+ //
+ // We retry ObjectNotExistException if the reference is
+ // indirect. Otherwise, we don't retry other
+ // *NotExistException, which are all derived from
+ // RequestFailedException.
+ //
LocatorInfoPtr li = ref->getLocatorInfo();
- if(!li)
+ if(li)
{
- ex.ice_throw();
+ li->clearObjectCache(IndirectReferencePtr::dynamicCast(ref));
+ }
+ else
+ {
+ //
+ // TODO: For now, we retry on ObjectNotExistException if
+ // we are using a router, to handle proxies evicted by the
+ // router.
+ //
+ if(!ref->getRouterInfo())
+ {
+ ex.ice_throw();
+ }
}
- li->clearObjectCache(IndirectReferencePtr::dynamicCast(ref));
}
else if(dynamic_cast<const RequestFailedException*>(&ex))
{