fix(electron): export and import (#9767)

This commit is contained in:
forehalo
2025-01-20 08:48:03 +00:00
parent 2e18ae59e3
commit cb53baca89
26 changed files with 332 additions and 453 deletions
+7 -3
View File
@@ -46,9 +46,13 @@ impl SqliteDocStoragePool {
}
pub async fn disconnect(&self, universal_id: String) -> Result<()> {
let storage = self.ensure_storage(universal_id.to_owned())?;
storage.close().await;
self.inner.remove(&universal_id);
let entry = self.inner.entry(universal_id);
if let Entry::Occupied(entry) = entry {
let storage = entry.remove();
storage.close().await;
}
Ok(())
}
}