Interrupt loading thread after shutdown request
This commit is contained in:
parent
8e6f9f4ebc
commit
2e9406c0c5
1 changed files with 2 additions and 0 deletions
|
@ -680,11 +680,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
|
||||||
if (!ActivateBestChain(state, chainparams)) {
|
if (!ActivateBestChain(state, chainparams)) {
|
||||||
LogPrintf("Failed to connect best block");
|
LogPrintf("Failed to connect best block");
|
||||||
StartShutdown();
|
StartShutdown();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
|
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
|
||||||
LogPrintf("Stopping after block import\n");
|
LogPrintf("Stopping after block import\n");
|
||||||
StartShutdown();
|
StartShutdown();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} // End scope of CImportingNow
|
} // End scope of CImportingNow
|
||||||
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
||||||
|
|
Loading…
Reference in a new issue