diff --git a/apps/electron/layers/main/src/db/base-db-adapter.ts b/apps/electron/layers/main/src/db/base-db-adapter.ts index 268253ca79..581d283316 100644 --- a/apps/electron/layers/main/src/db/base-db-adapter.ts +++ b/apps/electron/layers/main/src/db/base-db-adapter.ts @@ -23,8 +23,9 @@ export abstract class BaseSQLiteAdapter { async destroy() { const { db } = this; this.db = null; - await db?.close(); + // log after close will sometimes crash the app when quitting logger.info(`[SQLiteAdapter:${this.role}]`, 'destroyed:', this.path); + await db?.close(); } async addBlob(key: string, data: Uint8Array) {