From 2e9406c0c588ddf6f039fd3ff73c978177483869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Mon, 12 Feb 2018 11:17:36 +0000 Subject: [PATCH] Interrupt loading thread after shutdown request --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index b28baba77..895a5358f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -680,11 +680,13 @@ void ThreadImport(std::vector 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)) {