aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-03-09 12:02:57 -0500
committerGavin Andresen <gavinandresen@gmail.com>2013-04-03 19:57:53 -0400
commitb31499ec72edd1554d4612d1b54808fce0360e14 (patch)
treea2d03852b9fd6e9595470210479f212ccf4313f1 /src/db.cpp
parent21eb5adadbe3110a8708f2570185566e1f137a49 (diff)
Clean up shutdown process
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 87c4b5c7e4..35d6cca890 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -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);