Skip to content

Commit

Permalink
Fixes a race condition with ProgressListener.End (#1183)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd authored Oct 24, 2023
1 parent c6fd5c4 commit 880f298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FsAutoComplete/LspServers/FSharpLspClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 880f298

Please sign in to comment.