fix db connection
This commit is contained in:
@@ -216,6 +216,13 @@ db.disconnect = async () => {
|
||||
|
||||
db.registerIpcHandlers = () => {
|
||||
ipcMain.handle("db-connect", async () => {
|
||||
if (db.isConnecting)
|
||||
return {
|
||||
state: "connecting",
|
||||
path: settings.dbPath(),
|
||||
error: null,
|
||||
};
|
||||
|
||||
try {
|
||||
await db.connect();
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user