File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
src/client/datascience/jupyter/liveshare Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 47
47
48
48
### Fixes
49
49
50
+ 1 . Use the autoStart server when available.
51
+ ([ #9926 ] ( https://github.com/Microsoft/vscode-python/issues/9926 ) )
50
52
1 . Removed unnecessary warning when executing cells that use Scrapbook,
51
53
Fix an html crash when using not supported mime types
52
54
([ #9796 ] ( https://github.com/microsoft/vscode-python/issues/9796 ) )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ interface IServerData {
17
17
options : INotebookServerOptions ;
18
18
promise : Promise < INotebookServer | undefined > ;
19
19
cancelSource : CancellationTokenSource ;
20
+ resolved : boolean ;
20
21
}
21
22
22
23
export class ServerCache implements IAsyncDisposable {
@@ -43,7 +44,7 @@ export class ServerCache implements IAsyncDisposable {
43
44
44
45
// See if the old options had the same UI setting. If not,
45
46
// cancel the old
46
- if ( data && data . options . disableUI !== fixedOptions . disableUI ) {
47
+ if ( data && ! data . resolved && data . options . disableUI !== fixedOptions . disableUI ) {
47
48
traceInfo ( 'Cancelling server create as UI state has changed' ) ;
48
49
data . cancelSource . cancel ( ) ;
49
50
data = undefined ;
@@ -55,7 +56,8 @@ export class ServerCache implements IAsyncDisposable {
55
56
data = {
56
57
promise : createFunction ( options , cancelSource . token ) ,
57
58
options : fixedOptions ,
58
- cancelSource
59
+ cancelSource,
60
+ resolved : false
59
61
} ;
60
62
this . cache . set ( key , data ) ;
61
63
}
@@ -75,6 +77,11 @@ export class ServerCache implements IAsyncDisposable {
75
77
return oldDispose ( ) ;
76
78
} ;
77
79
80
+ // We've resolved the promise at this point
81
+ if ( data ) {
82
+ data . resolved = true ;
83
+ }
84
+
78
85
return server ;
79
86
} )
80
87
. catch ( e => {
You can’t perform that action at this time.
0 commit comments