Skip to content

Commit

Permalink
Incorporated the feedback for socket connection
Browse files Browse the repository at this point in the history
  • Loading branch information
birojnayak authored and mconnew committed Oct 24, 2023
1 parent 0a33400 commit 6a652f6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ private void AbortWrite()

public ValueTask<int> ReadAsync(Memory<byte> buffer, TimeSpan timeout)
{
if (buffer.Length <= 0)
if (buffer.Length < 0)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(buffer.Length), buffer.Length, SR.ValueMustBePositive));
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(buffer.Length), buffer.Length, SR.ValueMustBeNonNegative));
}
ThrowIfNotOpen();

Expand Down

0 comments on commit 6a652f6

Please sign in to comment.