Fixing OE disconnecting connections when other types of connections are disconnected. (#23080)

This commit is contained in:
Aasim Khan
2023-05-12 07:28:41 -07:00
committed by GitHub
parent 9116f66ca4
commit 39087ba5ce

View File

@@ -229,10 +229,10 @@ export class ServerTreeView extends Disposable implements IServerTreeView {
})); }));
this._register(this._connectionManagementService.onDisconnect(async (connectionParams) => { this._register(this._connectionManagementService.onDisconnect(async (connectionParams) => {
if (this._tree instanceof AsyncServerTree) { if (this.isObjectExplorerConnectionUri(connectionParams.connectionUri)) {
await this.disconnectConnection(<ConnectionProfile>connectionParams.connectionProfile); if (this._tree instanceof AsyncServerTree) {
} else { await this.disconnectConnection(<ConnectionProfile>connectionParams.connectionProfile);
if (this.isObjectExplorerConnectionUri(connectionParams.connectionUri)) { } else {
this.deleteObjectExplorerNodeAndRefreshTree(connectionParams.connectionProfile).catch(errors.onUnexpectedError); this.deleteObjectExplorerNodeAndRefreshTree(connectionParams.connectionProfile).catch(errors.onUnexpectedError);
} }
} }