Skip to content

Commit

Permalink
fix: add tracing for failed FinishRequest in ServerState
Browse files Browse the repository at this point in the history
  • Loading branch information
razzmatazz committed May 20, 2024
1 parent d083c82 commit 2bdcec7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/CSharpLanguageServer/State/ServerState.fs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ let getDocumentForUriOfType state docType (u: string) =
| AnyDocument -> matchingUserDocumentMaybe |> Option.orElse matchingDecompiledDocumentMaybe
| None -> None

let processServerEvent logger state postMsg msg: Async<ServerState> = async {
let processServerEvent (logger: ILog) state postMsg msg : Async<ServerState> = async {
let showMessage m =
match state.LspClient with
| Some lspClient -> lspClient.WindowShowMessage(
Expand Down Expand Up @@ -187,7 +187,12 @@ let processServerEvent logger state postMsg msg: Async<ServerState> = async {

postMsg ProcessRequestQueue
return newState
| None -> return state
| None ->
logger.debug (
Log.setMessage "serverEventLoop/FinishRequest#{requestId}: request not found in state.RunningRequests"
>> Log.addContext "requestId" (requestId |> string)
)
return state

| ProcessRequestQueue ->
let runningRWRequestMaybe =
Expand Down

0 comments on commit 2bdcec7

Please sign in to comment.