Fix passing in connection profile (#8689)

This commit is contained in:
Chris LaFreniere
2019-12-16 13:20:43 -08:00
committed by GitHub
parent 6e8a08c27a
commit 826e069b63
2 changed files with 3 additions and 19 deletions

View File

@@ -449,7 +449,9 @@ export class NotebookModel extends Disposable implements INotebookModel {
if (!this._activeClientSession) {
this.updateActiveClientSession(clientSession);
}
let profile = new ConnectionProfile(this._notebookOptions.capabilitiesService, this.connectionProfile);
// If a connection profile is passed in and _activeConnection isn't yet set, use that. Otherwise, use _activeConnection
let profile = this._activeConnection ? this._activeConnection : new ConnectionProfile(this._notebookOptions.capabilitiesService, this.connectionProfile);
if (this.isValidConnection(profile)) {
this._activeConnection = profile;