mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Only when the connection is connected, then do disconnect. (#5170)
This commit is contained in:
@@ -329,7 +329,13 @@ class SqlKernel extends Disposable implements nb.IKernel {
|
|||||||
|
|
||||||
public async disconnect(): Promise<void> {
|
public async disconnect(): Promise<void> {
|
||||||
if (this._path) {
|
if (this._path) {
|
||||||
await this._connectionManagementService.disconnect(this._path);
|
if (this._connectionManagementService.isConnected(this._path)) {
|
||||||
|
try {
|
||||||
|
await this._connectionManagementService.disconnect(this._path);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user