diff options
Diffstat (limited to 'cpp/src/IceGrid/NodeSessionManager.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeSessionManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/NodeSessionManager.cpp b/cpp/src/IceGrid/NodeSessionManager.cpp index 5823e73a379..7bae899a9bf 100644 --- a/cpp/src/IceGrid/NodeSessionManager.cpp +++ b/cpp/src/IceGrid/NodeSessionManager.cpp @@ -140,12 +140,15 @@ NodeSessionKeepAliveThread::createSessionImpl(const InternalRegistryPrx& registr { timeout = IceUtil::Time::seconds(t / 2); } + _node->addObserver(_name, session->getObserver()); return session; } void NodeSessionKeepAliveThread::destroySession(const NodeSessionPrx& session) { + _node->removeObserver(_name); + try { session->destroy(); @@ -473,13 +476,8 @@ NodeSessionManager::createdSession(const NodeSessionPrx& session) if(session) { session->loadServers(); - _node->setObserver(session->getObserver()); _node->checkConsistency(session); } - else - { - _node->setObserver(0); - } } catch(const Ice::LocalException&) { |