mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
* Fixed #4384 add await on disconnect * Resolve PR comment
This commit is contained in:
@@ -712,11 +712,11 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
if (this.notebookOptions && this.notebookOptions.connectionService) {
|
||||
let connectionService = this.notebookOptions.connectionService;
|
||||
if (this._otherConnections) {
|
||||
this._otherConnections.forEach(conn => connectionService.disconnect(conn).catch(e => console.log(e)));
|
||||
notebookUtils.asyncForEach(this._otherConnections, async (conn) => await connectionService.disconnect(conn).catch(e => console.log(e)));
|
||||
this._otherConnections = [];
|
||||
}
|
||||
if (this._activeConnection) {
|
||||
this.notebookOptions.connectionService.disconnect(this._activeConnection).catch(e => console.log(e));
|
||||
await this.notebookOptions.connectionService.disconnect(this._activeConnection).catch(e => console.log(e));
|
||||
this._activeConnection = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user