Interrupt loading thread after shutdown request

This commit is contained in:
João Barbosa 2018-02-12 11:17:36 +00:00
parent 8e6f9f4ebc
commit 2e9406c0c5
1 changed files with 2 additions and 0 deletions

View File

@ -680,11 +680,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)) {