Fix database closed multiple times.

utt part support Ctrl + C
This commit is contained in:
2023-05-23 10:50:56 +08:00
parent 144797f246
commit 5c9712a02c
6 changed files with 69 additions and 12 deletions

View File

@@ -93,7 +93,10 @@ export class TaskManager {
}
}
close() {
if (this.#closed) return;
if (this.#closed) {
console.trace("Manager closed multiple times.");
return;
}
this.#closed = true;
this.db.close();
}