fix: prevent refresh from auto-reconnecting closed connections

This commit is contained in:
t8y2 2026-05-27 16:30:44 +08:00
parent 07c1948ff8
commit 94898ed84a
1 changed files with 2 additions and 0 deletions

View File

@ -1298,6 +1298,7 @@ export const useConnectionStore = defineStore("connection", () => {
return;
}
if (node.connectionId && !connectedIds.value.has(node.connectionId)) return;
const expandedIds = collectExpandedNodeIds([node]);
expandedIds.add(node.id);
await clearPersistedTreeCacheForNode(node);
@ -1505,6 +1506,7 @@ export const useConnectionStore = defineStore("connection", () => {
continue;
}
if (!expandedIds.has(node.id)) continue;
if (node.connectionId && !connectedIds.value.has(node.connectionId)) continue;
clearLoadedChildrenCache(node.id);
node.children = [];
await loadTreeNodeChildren(node, { force: true });