fix: electron dev crash (#2746)
This commit is contained in:
@@ -23,8 +23,9 @@ export abstract class BaseSQLiteAdapter {
|
|||||||
async destroy() {
|
async destroy() {
|
||||||
const { db } = this;
|
const { db } = this;
|
||||||
this.db = null;
|
this.db = null;
|
||||||
await db?.close();
|
// log after close will sometimes crash the app when quitting
|
||||||
logger.info(`[SQLiteAdapter:${this.role}]`, 'destroyed:', this.path);
|
logger.info(`[SQLiteAdapter:${this.role}]`, 'destroyed:', this.path);
|
||||||
|
await db?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
async addBlob(key: string, data: Uint8Array) {
|
async addBlob(key: string, data: Uint8Array) {
|
||||||
|
|||||||
Reference in New Issue
Block a user