diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-12-12 08:52:16 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-12-12 08:52:16 +0000 |
commit | 2c767a34f8da6b2cb1e015398818e42b545be4b2 (patch) | |
tree | 53f70bb3455426c80e1c5a5a15ac0bf2e1f4541c /cpp/src/IceGrid/NodeCache.cpp | |
parent | First cut for ShowLogDialog (diff) | |
download | ice-2c767a34f8da6b2cb1e015398818e42b545be4b2.tar.bz2 ice-2c767a34f8da6b2cb1e015398818e42b545be4b2.tar.xz ice-2c767a34f8da6b2cb1e015398818e42b545be4b2.zip |
Added timeouts
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 9b9e798aa5f..69fdd9e98e3 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -84,7 +84,7 @@ public: Ice::Trace out(_traceLevels->logger, _traceLevels->serverCat); out << "couldn't load `" << _id << "' on node `" << _node << "':\n" << ex; } - + ostringstream os; os << ex; _server->exception(NodeUnreachableException(_node, os.str())); @@ -290,26 +290,25 @@ NodeEntry::setSession(const NodeSessionIPtr& session) sync.acquire(); } } + + // + // Clear the saved proxy, the node has established a session + // so we won't need anymore to try to register it with this + // registry. + // + _proxy = 0; } - else if(!session && !_session) - { - return; - } - - if(!session && _session) + else { + if(!_session) + { + return; + } } _session = session; notifyAll(); - // - // Clear the saved proxy, the node has established a session - // so we won't need anymore to try to register it with this - // registry. - // - _proxy = 0; - if(_registering) { _registering = false; @@ -636,13 +635,13 @@ NodeEntry::checkSession() const out << "creating node `" << _name << "' session"; } - NodeEntry* self = const_cast<NodeEntry*>(this); // // NOTE: setting _registering to true must be done before the // call otherwise if the callback is call immediately we'll // hang in the while loop. // _registering = true; + NodeEntry* self = const_cast<NodeEntry*>(this); _proxy->registerWithReplica_async(new RegisterCB(self), _cache.getReplicaCache().getInternalRegistry()); _proxy = 0; // Registration with the proxy is only attempted once. } |