psi
psi copied to clipboard
[Suggestion] Adding more debug info into TcpWriter.
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