mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Clean up shutdown process
This commit is contained in:
@@ -62,8 +62,7 @@ bool CDBEnv::Open(const boost::filesystem::path& path)
|
||||
if (fDbEnvInit)
|
||||
return true;
|
||||
|
||||
if (fShutdown)
|
||||
return false;
|
||||
boost::this_thread::interruption_point();
|
||||
|
||||
strPath = path.string();
|
||||
filesystem::path pathLogDir = path / "database";
|
||||
@@ -108,8 +107,7 @@ void CDBEnv::MakeMock()
|
||||
if (fDbEnvInit)
|
||||
throw runtime_error("CDBEnv::MakeMock(): already initialized");
|
||||
|
||||
if (fShutdown)
|
||||
throw runtime_error("CDBEnv::MakeMock(): during shutdown");
|
||||
boost::this_thread::interruption_point();
|
||||
|
||||
printf("CDBEnv::MakeMock()\n");
|
||||
|
||||
@@ -327,7 +325,7 @@ bool CDBEnv::RemoveDb(const string& strFile)
|
||||
|
||||
bool CDB::Rewrite(const string& strFile, const char* pszSkip)
|
||||
{
|
||||
while (!fShutdown)
|
||||
while (true)
|
||||
{
|
||||
{
|
||||
LOCK(bitdb.cs_db);
|
||||
|
||||
Reference in New Issue
Block a user