summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ReplicaSessionI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/ReplicaSessionI.cpp')
-rw-r--r--cpp/src/IceGrid/ReplicaSessionI.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/ReplicaSessionI.cpp b/cpp/src/IceGrid/ReplicaSessionI.cpp
index a96f71a1040..51cb70eebf3 100644
--- a/cpp/src/IceGrid/ReplicaSessionI.cpp
+++ b/cpp/src/IceGrid/ReplicaSessionI.cpp
@@ -270,12 +270,15 @@ ReplicaSessionI::destroyImpl(bool shutdown)
_database->getObserverTopic(ObjectObserverTopicName)->unsubscribe(_observer, _info->name);
}
+ // Don't remove the replica proxy from the database if the registry is being shutdown.
if(!_replicaWellKnownObjects.empty())
{
if(shutdown) // Don't remove the replica proxy from the database if the registry is being shutdown.
{
- ObjectInfoSeq::iterator p = find(_replicaWellKnownObjects.begin(), _replicaWellKnownObjects.end(),
- _internalRegistry->ice_getIdentity());
+ Ice::Identity id;
+ id.category = _internalRegistry->ice_getIdentity().category;
+ id.name = "Registry-" + _info->name;
+ ObjectInfoSeq::iterator p = find(_replicaWellKnownObjects.begin(), _replicaWellKnownObjects.end(), id);
if(p != _replicaWellKnownObjects.end())
{
_replicaWellKnownObjects.erase(p);