aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-02-12 11:17:36 +0000
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-15 14:42:27 +0100
commitf8938248ef37f67986e36ef897a548123b2d7a36 (patch)
tree54b44a137702e938d5d4d2177473f18425befd3e /src
parentff44101e8d5debfdff95dac5221d13f49eba2911 (diff)
Interrupt loading thread after shutdown request
Github-Pull: #12415 Rebased-From: 2e9406c0c588ddf6f039fd3ff73c978177483869 Tree-SHA512: ad70df9fdcba38bc9eeac4e4e64f7d8607fbe92aefac3579a26939e642112d70ebee81c5a227bb8735bae87f95640061a5ab22b583275c7dd6c3277544bc427b
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 0896ad0d29..2a37ae780f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -678,11 +678,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
if (!ActivateBestChain(state, chainparams)) {
LogPrintf("Failed to connect best block");
StartShutdown();
+ return;
}
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
LogPrintf("Stopping after block import\n");
StartShutdown();
+ return;
}
} // End scope of CImportingNow
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {