File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
3
3
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
5
5
6
+ ## [ Unreleased]
7
+
8
+ * Fix an issue intermittent server crashing after upgrading to latest Ionide.LanguageServerProtocol;
9
+
6
10
## [ 0.5.4] - 2022-08-20 / Šilavotas
7
11
https://www.lrytas.lt/kultura/istorija/2021/08/07/news/kitoks-kaimas-prienu-rajone-kurio-neisdraske-net-sovietu-valdzia-bendruomenes-nariais-tampa-ir-kaunieciai-20347142
8
12
* Upgrade roslyn libs to 4.4.0-1.final;
Original file line number Diff line number Diff line change @@ -1008,15 +1008,17 @@ let setupServerHandlers options (lspClient: LspClient) =
1008
1008
1009
1009
try
1010
1010
let scope = ServerRequestScope( state, stateActor.Post, logMessage)
1011
- try
1012
- return ! asyncFn scope param
1013
- with
1014
- | ex ->
1015
- let unpackedEx = ex |> unpackException
1016
- if ( unpackedEx : ? TaskCanceledException ) || ( unpackedEx :? OperationCanceledException ) then
1017
- return LspResult.requestCancelled
1018
- else
1019
- return LspResult.internalError ( string ex)
1011
+
1012
+ let! resultOrExn = ( asyncFn scope param) |> Async.Catch
1013
+
1014
+ return
1015
+ match resultOrExn with
1016
+ | Choice1Of2 result -> result
1017
+ | Choice2Of2 exn ->
1018
+ match exn with
1019
+ | : ? TaskCanceledException -> LspResult .requestCancelled
1020
+ | : ? OperationCanceledException -> LspResult .requestCancelled
1021
+ | _ -> LspResult.internalError ( string exn)
1020
1022
finally
1021
1023
stateActor.Post( FinishRequest requestId)
1022
1024
}
You can’t perform that action at this time.
0 commit comments