diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-02-12 11:17:36 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-02-12 11:18:22 +0000 |
commit | 2e9406c0c588ddf6f039fd3ff73c978177483869 (patch) | |
tree | ca8084f0ef61e3549c2b8a51981ff2d1a8492337 /src/init.cpp | |
parent | 8e6f9f4ebc74f4e302e1e38ee21e1afd0d3823ce (diff) |
Interrupt loading thread after shutdown request
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index b28baba779..895a5358f4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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)) { |