summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/LocatorInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/LocatorInfo.cpp')
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index a99a1c163c3..4cc7e7a76a4 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -383,13 +383,22 @@ IceInternal::LocatorInfo::clearObjectCache(const IndirectReferencePtr& ref)
if(ref->getAdapterId().empty())
{
ObjectPrx object = _table->removeProxy(ref->getIdentity());
-
- if(ref->getInstance()->traceLevels()->location >= 2 && object)
+ if(object)
{
- vector<EndpointPtr> endpoints = object->__reference()->getEndpoints();
- if(!endpoints.empty())
+ IndirectReferencePtr oir = IndirectReferencePtr::dynamicCast(object->__reference());
+ if(oir)
{
- trace("removed endpoints from locator table", ref, endpoints);
+ if(!oir->getAdapterId().empty())
+ {
+ clearCache(oir);
+ }
+ }
+ else
+ {
+ if(ref->getInstance()->traceLevels()->location >= 2)
+ {
+ trace("removed endpoints from locator table", ref, object->__reference()->getEndpoints());
+ }
}
}
}