Fix notebook cancel query bug (#12300)

* fix undefined query runner error

* store connection id

* revert sqlSessionManager change
This commit is contained in:
Lucy Zhang
2020-09-15 11:31:31 -07:00
committed by GitHub
parent 908a15d6a8
commit 0be5f67621

View File

@@ -48,6 +48,7 @@ export class ClientSession implements IClientSession {
private isServerStarted: boolean;
private notebookManager: INotebookManager;
private _kernelConfigActions: ((kernelName: string) => Promise<any>)[] = [];
private _connectionId: string = '';
constructor(private options: IClientSessionOptions) {
this._notebookUri = options.notebookUri;
@@ -288,8 +289,9 @@ export class ClientSession implements IClientSession {
// TODO is there any case where skipping causes errors? So far it seems like it gets called twice
return;
}
if (connection.id !== '-1') {
if (connection.id !== '-1' && connection.id !== this._connectionId) {
await this._session.configureConnection(connection);
this._connectionId = connection.id;
}
}