summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ReplicaSessionManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/ReplicaSessionManager.cpp')
-rw-r--r--cpp/src/IceGrid/ReplicaSessionManager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp
index 05e57c908ef..74ff82acb46 100644
--- a/cpp/src/IceGrid/ReplicaSessionManager.cpp
+++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp
@@ -346,16 +346,19 @@ ReplicaSessionManager::getNodes(const NodePrxSeq& nodes) const
void
ReplicaSessionManager::destroy()
{
+ ThreadPtr thread;
{
Lock sync(*this);
if(!_thread)
{
return;
}
+ thread = _thread;
+ _thread = 0;
}
- _thread->terminate();
- _thread->getThreadControl().join();
+ thread->terminate();
+ thread->getThreadControl().join();
_database = 0;
_wellKnownObjects = 0;