summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-02-06 12:51:37 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-02-06 12:51:37 +0100
commitc5d667a8599e4644dc3816550983a8a6960e197a (patch)
treeef87eb32b29d3c88b91fc690b117b887acce42ef /cpp
parentFixed ICE-7554 - Ice/ami cross test failure, missing ObjC sleep impl (diff)
parentFixed ICE-7428 - Potential IceGrid node crash on shutdown (diff)
downloadice-c5d667a8599e4644dc3816550983a8a6960e197a.tar.bz2
ice-c5d667a8599e4644dc3816550983a8a6960e197a.tar.xz
ice-c5d667a8599e4644dc3816550983a8a6960e197a.zip
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/IceGrid/Activator.cpp5
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp9
2 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index 7e7224c142e..adc9dce5070 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -1057,6 +1057,11 @@ void
Activator::shutdown()
{
IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this);
+ if(_deactivating)
+ {
+ return;
+ }
+
//
// Deactivation has been initiated. Set _deactivating to true to
// prevent activation of new processes. This will also cause the
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index 027a266a3a3..789c3857332 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -167,16 +167,12 @@ NodeService::~NodeService()
{
}
-
bool
NodeService::shutdown()
{
- assert(_activator);
+ assert(_activator && _sessions.get());
_activator->shutdown();
- if(_sessions.get())
- {
- _sessions->terminate(); // Unblock the main thread if it's blocked on waitForCreate()
- }
+ _sessions->terminate(); // Unblock the main thread if it's blocked on waitForCreate()
return true;
}
@@ -669,7 +665,6 @@ NodeService::stop()
{
assert(false);
}
- _activator = 0;
}
if(_timer)