Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Mar 17, 2022
1 parent a56edb9 commit bb64bcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kernels/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ export class Kernel implements IKernel {
await this.restarting.promise;
}
if (!this._notebookPromise) {
traceInfoIfCI(`Create new cancellation token for ${getDisplayPath(this.notebookDocument.uri)}`);
// Don't create a new one unnecessarily.
if (this.startCancellation.token.isCancellationRequested) {
traceInfoIfCI(`Create new cancellation token for ${getDisplayPath(this.notebookDocument.uri)}`);
this.startCancellation = new CancellationTokenSource();
}
this._notebookPromise = this.createNotebook(new StopWatch()).catch((ex) => {
Expand Down

0 comments on commit bb64bcb

Please sign in to comment.