File tree Expand file tree Collapse file tree
extensions/ql-vscode/src/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ export abstract class Discovery<T> extends DisposableObject {
5151 this . restartWhenFinished = true ;
5252 } else {
5353 // No discovery in progress, so start one now.
54- this . currentDiscoveryPromise = this . launchDiscovery ( ) ;
54+ this . currentDiscoveryPromise = this . launchDiscovery ( ) . finally ( ( ) => {
55+ this . currentDiscoveryPromise = undefined ;
56+ } ) ;
5557 }
5658 return this . currentDiscoveryPromise ;
5759 }
@@ -81,8 +83,6 @@ export abstract class Discovery<T> extends DisposableObject {
8183 this . restartWhenFinished = false ;
8284 await this . launchDiscovery ( ) ;
8385 } else {
84- this . currentDiscoveryPromise = undefined ;
85-
8686 // If the discovery was successful, then update any listeners with the results.
8787 if ( results !== undefined ) {
8888 this . update ( results ) ;
You can’t perform that action at this time.
0 commit comments