Pass the array segment offset to WriteAsync (#1467)

This commit is contained in:
David Fowler 2018-02-17 01:26:07 -08:00 committed by GitHub
parent 3acd29ec6f
commit de7faec246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment);
// We're using the managed memory pool which is backed by managed buffers
Debug.Assert(isArray);
await context.Response.Body.WriteAsync(arraySegment.Array, 0, arraySegment.Count);
await context.Response.Body.WriteAsync(arraySegment.Array, arraySegment.Offset, arraySegment.Count);
}
}
finally