summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ReplicaSessionI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-08-28 17:56:33 +0200
committerBenoit Foucher <benoit@zeroc.com>2013-08-28 17:56:33 +0200
commit08cb802bb321d6a92323792d4f0dbefe13d87032 (patch)
tree07a487d26275ce136e8dee0d12422d2afe2498b5 /cpp/src/IceGrid/ReplicaSessionI.cpp
parentmakedist.py fixes (diff)
downloadice-08cb802bb321d6a92323792d4f0dbefe13d87032.tar.bz2
ice-08cb802bb321d6a92323792d4f0dbefe13d87032.tar.xz
ice-08cb802bb321d6a92323792d4f0dbefe13d87032.zip
Fix for ICE-5357: improved discovery of replicas on node/slave startup
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);