Skip to content

Conversation

@AArnott
Copy link
Member

@AArnott AArnott commented Mar 29, 2025

When a formatter throws an exception from SetExpectedDataType, the exception was being swallowed, and the request just dangled at the client without ever completing. With this fix, it completes with the exception. Since being unable to serialize a result is a fatal exception, this leads to the connection dying. This is preferable to a hang, and the exception is captured as the cause of the disconnect for later analysis.

There is no test because the existing formatters don't throw in this code path. A new formatter might (like the one we're creating for Nerdbank.MessagePack).

@AArnott AArnott requested a review from matteo-prosperi March 29, 2025 01:47
@AArnott AArnott enabled auto-merge March 30, 2025 02:54
@AArnott AArnott merged commit cdd916a into main Mar 31, 2025
6 checks passed
@AArnott AArnott deleted the dev/andarno/fixhang branch March 31, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants