From 880f298741c10be2bff2ad3c66c90b797865c53e Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Tue, 24 Oct 2023 10:11:09 -0400 Subject: [PATCH] Fixes a race condition with ProgressListener.End (#1183) --- src/FsAutoComplete/LspServers/FSharpLspClient.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FsAutoComplete/LspServers/FSharpLspClient.fs b/src/FsAutoComplete/LspServers/FSharpLspClient.fs index 8c3634843..0489a6a61 100644 --- a/src/FsAutoComplete/LspServers/FSharpLspClient.fs +++ b/src/FsAutoComplete/LspServers/FSharpLspClient.fs @@ -163,10 +163,10 @@ type ServerProgressReport(lspClient: FSharpLspClient, ?token: ProgressToken) = cancellableTask { use! __ = fun ct -> locker.LockAsync(ct) let stillNeedsToSend = canReportProgress && not endSent - endSent <- true if stillNeedsToSend then do! lspClient.Progress(x.Token, WorkDoneProgressEnd.Create(?message = message)) + endSent <- true } interface IAsyncDisposable with