Skip to content

Commit 2e9406c

Browse files
committed
Interrupt loading thread after shutdown request
1 parent 8e6f9f4 commit 2e9406c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,11 +680,13 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
680680
if (!ActivateBestChain(state, chainparams)) {
681681
LogPrintf("Failed to connect best block");
682682
StartShutdown();
683+
return;
683684
}
684685

685686
if (gArgs.GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
686687
LogPrintf("Stopping after block import\n");
687688
StartShutdown();
689+
return;
688690
}
689691
} // End scope of CImportingNow
690692
if (gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {

0 commit comments

Comments
 (0)