From 101ef93aa57a85bfdf13dd5ed116742aa4344db2 Mon Sep 17 00:00:00 2001 From: Martin Bech Date: Sun, 27 Jan 2019 05:06:59 +0100 Subject: [PATCH] requests with no result now yields a response with empty result (#40) --- src/LSP/LanguageServer.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LSP/LanguageServer.fs b/src/LSP/LanguageServer.fs index ee62341..3922e3c 100644 --- a/src/LSP/LanguageServer.fs +++ b/src/LSP/LanguageServer.fs @@ -218,7 +218,7 @@ let connect(serverFactory: ILanguageClient -> ILanguageServer, receive: BinaryRe try match Async.RunSynchronously(task, 0, cancel.Token) with | Some(result) -> respond(send, id, result) - | None -> () + | None -> respond(send, id, "{}") with :? OperationCanceledException -> dprintfn "Request %d was cancelled" id pendingRequests.TryRemove(id) |> ignore