microsoft / microsoft/psi

[Suggestion] Adding more debug info into TcpWriter.

Open
#344 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.