Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit d06ce9d

Browse files
authored
fix ReadAtLeastAsync (#37130) (#37151)
1 parent 5d78c0f commit d06ce9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ internal static async ValueTask<int> ReadAtLeastAsync(Stream stream, Memory<byte
14831483
int totalBytesRead = 0;
14841484
while (totalBytesRead < minReadBytes)
14851485
{
1486-
int bytesRead = await stream.ReadAsync(buffer).ConfigureAwait(false);
1486+
int bytesRead = await stream.ReadAsync(buffer.Slice(totalBytesRead)).ConfigureAwait(false);
14871487
if (bytesRead == 0)
14881488
{
14891489
throw new IOException(SR.net_http_invalid_response);

0 commit comments

Comments
 (0)