mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-30 08:04:04 +00:00
Abort backup in progress if thread is told to shut down.
This commit is contained in:
parent
f7a407ffa0
commit
523412edfb
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user