From 345d6807f6ee83ba0d389de91723c1b23a753925 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Mon, 3 Apr 2006 20:54:32 +0000 Subject: attack test --- cpp/src/Ice/ProxyFactory.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'cpp/src/Ice/ProxyFactory.cpp') 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(&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(&ex)) { -- cgit v1.2.3