Skip to content

Commit

Permalink
Interrupt loading thread after shutdown request
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Feb 12, 2018
1 parent 8e6f9f4 commit 2e9406c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/init.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit 2e9406c

Please sign in to comment.