diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/Activator.cpp | 5 | ||||
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 9 |
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) |