diff --git a/core/indexing/CodebaseIndexer.ts b/core/indexing/CodebaseIndexer.ts index 6e1dab530..b28ece8da 100644 --- a/core/indexing/CodebaseIndexer.ts +++ b/core/indexing/CodebaseIndexer.ts @@ -735,6 +735,7 @@ export class CodebaseIndexer { }); } if (this.indexingCancellationController === localController) { + this.indexingCancellationController.abort(); // abort before clearing to prevent race condition (multiple starts) this.indexingCancellationController = undefined; } }