Skip to content

Commit

Permalink
Fixes a race condition with ProgressListener.End (ionide#1183)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd authored and nojaf committed Nov 3, 2023
1 parent 56e6076 commit 8e69565
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 8e69565

Please sign in to comment.