mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-08-27 05:47:07 +00:00
fix: close finite remote database connections
This commit is contained in:
@@ -58,7 +58,11 @@ async function verifyRemoteState(
|
||||
standardIo.writeStderr(`[Verification] Failed to connect to remote CouchDB: ${dbRet}\n`);
|
||||
return false;
|
||||
}
|
||||
milestone = await dbRet.db.get(MILESTONE_DOCID);
|
||||
try {
|
||||
milestone = await dbRet.db.get(MILESTONE_DOCID);
|
||||
} finally {
|
||||
await dbRet.db.close();
|
||||
}
|
||||
} else if (settings.remoteType === REMOTE_MINIO) {
|
||||
milestone = await (replicator as LiveSyncJournalReplicator).client.downloadJson("_00000000-milestone.json");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user