microsoft / microsoft/vs-streamjsonrpc
Confusingly named ConnectionLostException thrown on client when client RPC instance is disposed prematurely
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 937
- Forks
- 178
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 28
Description
Repro:
- Create JsonRpc instance, e.g.: perhaps via brokered service, servicehub service.
- Invoke long running request
- Dispose RPC instance
Expected:
Clear indication of what the client is doing wrong, such as ObjectDisposedException or message indicating that the client RPC instance was disposed.
Actual:
ConnectionLostException is thrown on the invocation Task. While this matches the documented behavior, it's initially unclear that the client is doing something wrong and it is not the server crashing or forcibly ending the session. As a result I spent a lot of time digging through irrelevant server logs trying to figure out the source of the crash.
Recommendations:
It seems like there would be benefit to having a way to differentiate between client-severed-connection and server-severed-connection, especially in fault telemetry.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing where ConnectionLostException is produced after a client RPC instance is disposed and how the invocation Task reports it. Define and test a distinction between client-disposed and server-severed connections, including the fault telemetry or message expected for each case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100