fix(connection): avoid blocking disconnect cleanup

This commit is contained in:
t8y2 committed 2026-06-16 10:45:14 +08:00
1 parent 80a390a4c0
commit 47915c243d
2 files changed
+38 -6

No files matched your search

+1 -1
View File
@@ -734,7 +734,7 @@ pub async fn connection_final_proxy_port(
#[tauri::command]
pub async fn disconnect_db(state: State<'_, Arc<AppState>>, connection_id: String) -> Result<(), String> {
state.remove_connection_pools(&connection_id).await;
state.remove_connection_pools_detached(&connection_id).await;
state.reset_connection_transport(&connection_id).await;
if connection_id.starts_with("__visible_draft_") {
state.configs.write().await.remove(&connection_id);