diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-10-17 11:28:48 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-10-17 11:28:48 +0200 |
commit | e85fcf92f2af54b0add679e19262a42f92fedc92 (patch) | |
tree | f65b3f5251addf661c63665ea5d7bc6a0b2e5a20 /cpp/src/IceGrid/NodeCache.cpp | |
parent | Fixed (ICE-5752) - faultTolerance OS X 10.10 failures with SSL (diff) | |
download | ice-e85fcf92f2af54b0add679e19262a42f92fedc92.tar.bz2 ice-e85fcf92f2af54b0add679e19262a42f92fedc92.tar.xz ice-e85fcf92f2af54b0add679e19262a42f92fedc92.zip |
Fixed ICE-5518: allows saving application with no-restart when removing stopped server
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index e2f79359078..08712c42753 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -635,7 +635,7 @@ NodeEntry::loadServer(const ServerEntryPtr& entry, const ServerInfo& server, con } void -NodeEntry::destroyServer(const ServerEntryPtr& entry, const ServerInfo& info, int timeout) +NodeEntry::destroyServer(const ServerEntryPtr& entry, const ServerInfo& info, int timeout, bool noRestart) { try { @@ -663,10 +663,23 @@ NodeEntry::destroyServer(const ServerEntryPtr& entry, const ServerInfo& info, in out << "unloading `" << info.descriptor->id << "' on node `" << _name << "'"; } - node->begin_destroyServer(info.descriptor->id, info.uuid, info.revision, _cache.getReplicaName(), - newCallback_Node_destroyServer(new DestroyCB(_cache.getTraceLevels(), entry, _name), - &DestroyCB::response, - &DestroyCB::exception)); + if(noRestart) + { + node->begin_destroyServerWithoutRestart(info.descriptor->id, info.uuid, info.revision, + _cache.getReplicaName(), + newCallback_Node_destroyServerWithoutRestart( + new DestroyCB(_cache.getTraceLevels(), entry, _name), + &DestroyCB::response, + &DestroyCB::exception)); + } + else + { + node->begin_destroyServer(info.descriptor->id, info.uuid, info.revision, _cache.getReplicaName(), + newCallback_Node_destroyServer( + new DestroyCB(_cache.getTraceLevels(), entry, _name), + &DestroyCB::response, + &DestroyCB::exception)); + } } catch(const NodeUnreachableException& ex) { |