Skip to content

Commit 01fde2a

Browse files
committed
优化代码
1 parent 5ca7e2d commit 01fde2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async function onLoad(plugin) {
8484
valueEncoding: "json"
8585
});
8686

87-
db.open();
87+
db.open();
8888

8989
ipcMain.handle("LiteLoader.anti_recall.clearDb", async (event, message) => {
9090
dialog
@@ -118,6 +118,7 @@ async function onLoad(plugin) {
118118
e.toString(),
119119
", retrying..."
120120
);
121+
await db.open();
121122
await loadDb();
122123
})
123124
.catch((e) => {
@@ -127,11 +128,11 @@ async function onLoad(plugin) {
127128
", stop load."
128129
);
129130
});
130-
}, 50);
131+
}, 100);
131132

132-
app.on("quit", () => {
133+
app.on("quit", async () => {
133134
output("Closing db...");
134-
db.close();
135+
await db.close();
135136
});
136137
}
137138

0 commit comments

Comments
 (0)