diff options
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index e74e7967a0c..07cbe4e4e60 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -1116,17 +1116,12 @@ ServerI::activate() ServerCommandPtr command; { Lock sync(*this); - if(_state != Activating) - { - // - // It's possible that the server has already terminated. - // - return; - } + assert(_state == Activating); _pid = pid; setStateNoSync(ServerI::WaitForActivation); checkActivation(); command = nextCommand(); + notifyAll(); // terminated() might already wait. } if(command) { @@ -1311,6 +1306,11 @@ ServerI::terminated(const string& msg, int status) disableOnFailure(); } + while(_state == ServerI::Activating) + { + wait(); // Wait for activate() to set the state to WaitForActivation + } + if(_state == ServerI::Destroying) { destroying = true; |