[Suggestion] Adding more debug info into TcpWriter.
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 574
- Forks
- 104
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
It could be great to add a Trace.WriteLine() in TcpWriter in the Receive method in case networkStream is null (line 68)
if (this.networkStream != null)
{
this.networkStream.Write(BitConverter.GetBytes(count), 0, sizeof(int));
this.networkStream.Write(bytes, offset, count);
}
#if DEBUG
else
{
Trace.WriteLine($"TcpWriter {name} trying to write while not connected!");
}
#endif
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
Locate TcpWriter and inspect its Receive method around line 68, especially the path where networkStream is null. Confirm the requested DEBUG-only Trace.WriteLine behavior and verify that the diagnostic output identifies the writer and disconnected state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100