Skip to content
Permalink
Browse files

fix ReadAtLeastAsync (#37130) (#37151)

  • Loading branch information...
wfurt committed Apr 24, 2019
1 parent 5d78c0f commit d06ce9d2116cb4bda528822e63d32ce3735ea653
@@ -1483,7 +1483,7 @@ internal static async ValueTask<int> ReadAtLeastAsync(Stream stream, Memory<byte
int totalBytesRead = 0;
while (totalBytesRead < minReadBytes)
{
int bytesRead = await stream.ReadAsync(buffer).ConfigureAwait(false);
int bytesRead = await stream.ReadAsync(buffer.Slice(totalBytesRead)).ConfigureAwait(false);
if (bytesRead == 0)
{
throw new IOException(SR.net_http_invalid_response);

0 comments on commit d06ce9d

Please sign in to comment.
You can’t perform that action at this time.