Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0441636

Browse files
authored
Fix raw kernel disposed problem (microsoft#13373)
* Fix intermittent problem with notebook being disposed * Fix for other promise too (caught by functional tests)
1 parent 793acf1 commit 0441636

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/client/datascience/interactive-common/interactiveBase.ts

+6
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,12 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp
825825
}
826826

827827
protected async ensureConnectionAndNotebook(): Promise<void> {
828+
// Start over if we somehow end up with a disposed notebook.
829+
if (this._notebook && this._notebook.disposed) {
830+
this._notebook = undefined;
831+
this.notebookPromise = undefined;
832+
this.connectionAndNotebookPromise = undefined;
833+
}
828834
if (!this.connectionAndNotebookPromise) {
829835
this.connectionAndNotebookPromise = this.ensureConnectionAndNotebookImpl();
830836
}

0 commit comments

Comments
 (0)