Skip to content

Commit 6a652f6

Browse files
Biroj Nayakmconnew
Biroj Nayak
authored andcommitted
Incorporated the feedback for socket connection
1 parent 0a33400 commit 6a652f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/System.ServiceModel.UnixDomainSocket/src/System/ServiceModel/Channels/SocketConnection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ private void AbortWrite()
155155

156156
public ValueTask<int> ReadAsync(Memory<byte> buffer, TimeSpan timeout)
157157
{
158-
if (buffer.Length <= 0)
158+
if (buffer.Length < 0)
159159
{
160-
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(buffer.Length), buffer.Length, SR.ValueMustBePositive));
160+
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(buffer.Length), buffer.Length, SR.ValueMustBeNonNegative));
161161
}
162162
ThrowIfNotOpen();
163163

0 commit comments

Comments
 (0)