Skip to content

Commit 8da5bf5

Browse files
committed
src: remove Cleanup in favor of Finalize
1 parent d81b7e3 commit 8da5bf5

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/node_sqlite.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,6 @@ class BackupJob : public ThreadPoolWork {
549549
}
550550

551551
void Finalize() {
552-
Cleanup();
553-
source_->RemoveBackup(this);
554-
}
555-
556-
void Cleanup() {
557552
if (backup_) {
558553
sqlite3_backup_finish(backup_);
559554
backup_ = nullptr;
@@ -564,6 +559,8 @@ class BackupJob : public ThreadPoolWork {
564559
sqlite3_close_v2(dest_);
565560
dest_ = nullptr;
566561
}
562+
563+
source_->RemoveBackup(this);
567564
}
568565

569566
private:
@@ -770,7 +767,7 @@ bool DatabaseSync::Open() {
770767

771768
void DatabaseSync::FinalizeBackups() {
772769
for (auto backup : backups_) {
773-
backup->Cleanup();
770+
backup->Finalize();
774771
}
775772

776773
backups_.clear();

0 commit comments

Comments
 (0)