summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ReplicaSessionManager.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-02-11 15:37:23 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-02-12 09:45:06 +0100
commitf7b2cf35dad61149a95874a50d25cbb6580b75dc (patch)
tree860a2537b0a872ca66f0bde601390d03aa286d84 /cpp/src/IceGrid/ReplicaSessionManager.cpp
parentFixed bug 3712 - bogus del tmp.buf in Make.rules.cs.mak (diff)
downloadice-f7b2cf35dad61149a95874a50d25cbb6580b75dc.tar.bz2
ice-f7b2cf35dad61149a95874a50d25cbb6580b75dc.tar.xz
ice-f7b2cf35dad61149a95874a50d25cbb6580b75dc.zip
Fixed bug 3722 & 3723 - IceGrid leaks upon start failure
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;