summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/IceGridNode.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-10-24 10:07:47 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-10-24 10:07:47 +0000
commit7b592e7fe94abf0e8e8e493bb5e83d92f0c5415f (patch)
tree573b60cfabd063723d8d2c4e9f81a4972581a2a6 /cpp/src/IceGrid/IceGridNode.cpp
parentRemoved Properties.sgml and ProxiesEndpoints.sgml. (diff)
downloadice-7b592e7fe94abf0e8e8e493bb5e83d92f0c5415f.tar.bz2
ice-7b592e7fe94abf0e8e8e493bb5e83d92f0c5415f.tar.xz
ice-7b592e7fe94abf0e8e8e493bb5e83d92f0c5415f.zip
Fixed bug where node couldn't be interrupted if master isn't available
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index 242d6f931f0..27426b3c3bc 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -154,6 +154,7 @@ NodeService::shutdown()
{
assert(_activator);
_activator->shutdown();
+ _sessions.terminate(); // Unblock the main thread if it's blocked on waitForCreate()
return true;
}
@@ -485,7 +486,14 @@ NodeService::start(int argc, char* argv[])
if(!bundleName.empty() || !desc.empty())
{
enableInterrupt();
- _sessions.waitForCreate();
+ if(!_sessions.waitForCreate())
+ {
+ //
+ // Create was interrupted, return true as if the service was
+ // correctly initiliazed to make sure it's properly stopped.
+ //
+ return true;
+ }
disableInterrupt();
}