diff options
author | Marc Laukien <marc@zeroc.com> | 2006-04-03 20:54:32 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2006-04-03 20:54:32 +0000 |
commit | 345d6807f6ee83ba0d389de91723c1b23a753925 (patch) | |
tree | 9bd2879974b6db1d098fab1d66af1246117c6f6c /cpp/src | |
parent | fix (diff) | |
download | ice-345d6807f6ee83ba0d389de91723c1b23a753925.tar.bz2 ice-345d6807f6ee83ba0d389de91723c1b23a753925.tar.xz ice-345d6807f6ee83ba0d389de91723c1b23a753925.zip |
attack test
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ProxyFactory.cpp | 28 |
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)) { |