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.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ReplicaSessionI.cpp b/cpp/src/IceGrid/ReplicaSessionI.cpp
index 605d0e77595..48250fb52d7 100644
--- a/cpp/src/IceGrid/ReplicaSessionI.cpp
+++ b/cpp/src/IceGrid/ReplicaSessionI.cpp
@@ -115,6 +115,7 @@ ReplicaSessionI::receivedUpdate(TopicName topic, int serial, const string& failu
void
ReplicaSessionI::destroy(const Ice::Current& current)
{
+ bool shutdown = !current.adapter;
{
Lock sync(*this);
if(_destroy)
@@ -126,7 +127,6 @@ ReplicaSessionI::destroy(const Ice::Current& current)
_database->removeReplica(_name, this);
_wellKnownObjects->unregisterWellKnownObjects(_replicaWellKnownObjects);
- bool shutdown = !current.adapter;
if(shutdown)
{
ObjectInfo info;
@@ -168,3 +168,10 @@ ReplicaSessionI::getEndpoint(const std::string& name)
Lock sync(*this);
return _replicaEndpoints[name];
}
+
+bool
+ReplicaSessionI::isDestroyed() const
+{
+ Lock sync(*this);
+ return _destroy;
+}