Abort backup in progress if thread is told to shut down.

This commit is contained in:
Adam Ierymenko 2015-11-03 16:03:00 -08:00
parent f7a407ffa0
commit 523412edfb

View File

@ -1029,6 +1029,12 @@ void SqliteNetworkController::threadMain()
int rc = SQLITE_OK;
for(;;) {
if (!_backupThreadRun) {
sqlite3_backup_finish(bak);
sqlite3_close(bakdb);
OSUtils::rm(backupPath);
return;
}
_lock.lock();
rc = sqlite3_backup_step(bak,64);
_lock.unlock();