Hi.
Found a small problem can can silently crash the language server's receiver so it simply stops processing messages. Basically, if you send the server a message like:
{
"jsonrpc": "2.0",
"id": "1234",
"method": "foo",
"params": null
}
Then the following line crashes with a NullReferenceException because hasParams is true, but @params is null:
|
if (hasParams && @params.Type != JTokenType.Array && @params.Type != JTokenType.Object) |
More generally, it looks like the receiver should probably have a try/catch around each receive cycle.
I'll open 2 PRs to separately deal with the NullReferenceException and the more-general try/catch.