diff --git a/src/sql/parts/connection/common/connectionManagementService.ts b/src/sql/parts/connection/common/connectionManagementService.ts index 60c01d3f76..3e24bf608c 100644 --- a/src/sql/parts/connection/common/connectionManagementService.ts +++ b/src/sql/parts/connection/common/connectionManagementService.ts @@ -1120,7 +1120,8 @@ export class ConnectionManagementService extends Disposable implements IConnecti resolve(result); }); } else { - resolve(self.disconnectEditor(owner)); + // If the editor is connected then there is nothing to cancel + resolve(false); } }); } diff --git a/src/sql/parts/connection/connectionDialog/connectionDialogService.ts b/src/sql/parts/connection/connectionDialog/connectionDialogService.ts index 01796c2fd8..fa8ef384fe 100644 --- a/src/sql/parts/connection/connectionDialog/connectionDialogService.ts +++ b/src/sql/parts/connection/connectionDialog/connectionDialogService.ts @@ -144,9 +144,6 @@ export class ConnectionDialogService implements IConnectionDialogService { } else { this._connectionManagementService.cancelConnection(this._model); } - if (params && params.input && params.input.onConnectReject) { - params.input.onConnectReject(); - } this._connectionDialog.resetConnection(); this._connecting = false; }