summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2011-07-07 10:28:51 +0200
committerBenoit Foucher <benoit@zeroc.com>2011-07-07 10:28:51 +0200
commit40360a51c84f89ec6a21b6c8d76e9db988c9cfa8 (patch)
treeb391e9a505a5e9b64093553c25d65f2040b5eb29 /cpp/src/IceGrid/ServerI.cpp
parentvsaddin fix for silverlight projects. (diff)
downloadice-40360a51c84f89ec6a21b6c8d76e9db988c9cfa8.tar.bz2
ice-40360a51c84f89ec6a21b6c8d76e9db988c9cfa8.tar.xz
ice-40360a51c84f89ec6a21b6c8d76e9db988c9cfa8.zip
Fixed bug 5166 - process deactivation bug
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rwxr-xr-xcpp/src/IceGrid/ServerI.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index 23c49ca691f..4b9f758f78b 100755
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -606,8 +606,8 @@ StartCommand::finished()
_startCB.clear();
}
-StopCommand::StopCommand(const ServerIPtr& server, const IceUtil::TimerPtr& timer, int timeout) :
- TimedServerCommand(server, timer, timeout)
+StopCommand::StopCommand(const ServerIPtr& server, const IceUtil::TimerPtr& timer, int timeout, bool deactivate)
+ : TimedServerCommand(server, timer, timeout), _deactivate(deactivate)
{
}
@@ -633,7 +633,10 @@ StopCommand::nextState()
void
StopCommand::execute()
{
- _server->deactivate();
+ if(_deactivate)
+ {
+ _server->deactivate();
+ }
}
void
@@ -1258,7 +1261,7 @@ ServerI::adapterDeactivated(const string& id)
if((_state == Active || _state == WaitForActivation) &&
_serverLifetimeAdapters.find(id) != _serverLifetimeAdapters.end())
{
- setStateNoSync(Deactivating);
+ _stop = new StopCommand(this, _node->getTimer(), _deactivationTimeout, false);
}
command = nextCommand();
}