summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahoo-inc.com>2017-09-06 10:49:58 +0200
committerGitHub <noreply@github.com>2017-09-06 10:49:58 +0200
commit0c8f9bdd5a8d6ce35e1a8adba174c51dc8583a92 (patch)
tree9a336fe9165478af96adcf4386a9b1702121311c /searchcore
parent368d5774e2df4db2ffd821c21d46790a3c89022b (diff)
parentd223330caeb49a458748fc6dfed719bc17688809 (diff)
Merge pull request #3336 from vespa-engine/balder/request-shutdown-instead-of-quick-exit-2
Balder/request shutdown instead of quick exit 2
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/proton/proton.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp
index 7515ddc4e23..5cdc8e04eb4 100644
--- a/searchcore/src/apps/proton/proton.cpp
+++ b/searchcore/src/apps/proton/proton.cpp
@@ -11,8 +11,6 @@
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/config/common/exceptions.h>
#include <vespa/fastos/app.h>
-
-#include <string>
#include <iostream>
#include <vespa/log/log.h>
@@ -224,9 +222,9 @@ App::Main()
proton.getMetricManager().init(params.identity, proton.getThreadPool());
}
EV_STARTED("proton");
- while (!(SIG::INT.check() || SIG::TERM.check())) {
+ while (!(SIG::INT.check() || SIG::TERM.check() || (spiProton && spiProton->getNode().attemptedStopped()))) {
FastOS_Thread::Sleep(1000);
- if (spiProton.get() && spiProton->configUpdated()) {
+ if (spiProton && spiProton->configUpdated()) {
storage::ResumeGuard guard(spiProton->getNode().pause());
spiProton->updateConfig();
}
@@ -247,7 +245,7 @@ App::Main()
}
}
}
- if (spiProton.get()) {
+ if (spiProton) {
spiProton->getNode().requestShutdown("controlled shutdown");
spiProton->shutdown();
EV_STOPPING("servicelayer", "clean shutdown");