diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-11-16 17:54:50 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-11-16 17:54:50 +0100 |
commit | 35ea645bf53d93373ba7a1457698caad74448add (patch) | |
tree | fc184e698c205d38604762996376910e85f01744 /cpp/src/IceGrid/ServerI.cpp | |
parent | Added .gitignore files (diff) | |
download | ice-35ea645bf53d93373ba7a1457698caad74448add.tar.bz2 ice-35ea645bf53d93373ba7a1457698caad74448add.tar.xz ice-35ea645bf53d93373ba7a1457698caad74448add.zip |
Bug 2446
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index f7dcfa7ea67..9e4a26302f4 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -748,22 +748,33 @@ ServerI::getProperties(const Ice::Current&) const Ice::ProcessPrx process = 0; { Lock sync(*this); - checkDestroyed(); // - // Wait for _process to be set + // Wait for _process to be set if the server is being activated. // - while(_desc->processRegistered && _process == 0) + while(_desc->processRegistered && _process == 0 && _state > Inactive && _state < Deactivating) { wait(); - checkDestroyed(); } - process = _process; - } - if(process == 0) - { - throw ServerUnreachableException(_id, "no Admin object"); + checkDestroyed(); + if(!_process) + { + if(_desc->processRegistered && _state == Inactive) + { + throw ServerUnreachableException(_id, "server is not active"); + } + else if(_desc->processRegistered && _state >= Deactivating) + { + throw ServerUnreachableException(_id, "server is deactivating"); + } + else + { + throw ServerUnreachableException(_id, "no Admin object"); + } + } + + process = _process; } try |