summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r--cpp/src/IceGrid/ServerI.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index c47f91bf792..6243aab1e36 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -1378,14 +1378,12 @@ ServerI::activate()
ServerCommandPtr command;
{
Lock sync(*this);
- if(_state != Activating)
- {
- return;
- }
+ assert(_state == Activating);
_pid = pid;
setStateNoSync(ServerI::WaitForActivation);
checkActivation();
command = nextCommand();
+ notifyAll(); // Terminated might be waiting for the state change.
}
if(command)
{
@@ -1553,10 +1551,10 @@ ServerI::terminated(const string& msg, int status)
ServerAdapterDict adpts;
{
Lock sync(*this);
-// while(_state == ServerI::Activating)
-// {
-// wait(); // Wait for activate() to set the state to WaitForActivation
-// }
+ while(_state == ServerI::Activating)
+ {
+ wait(); // Wait for activate() to set the state to WaitForActivation
+ }
adpts = _adapters;
_activatedAdapters.clear();