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) => {
if (this._tree instanceof AsyncServerTree) {
await this.disconnectConnection(<ConnectionProfile>connectionParams.connectionProfile);
} else {
if (this.isObjectExplorerConnectionUri(connectionParams.connectionUri)) {
if (this.isObjectExplorerConnectionUri(connectionParams.connectionUri)) {
if (this._tree instanceof AsyncServerTree) {
await this.disconnectConnection(<ConnectionProfile>connectionParams.connectionProfile);
} else {
this.deleteObjectExplorerNodeAndRefreshTree(connectionParams.connectionProfile).catch(errors.onUnexpectedError);
}
}