Pass the array segment offset to WriteAsync (#1467)
This commit is contained in:
parent
3acd29ec6f
commit
de7faec246
|
|
@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Sockets.Internal.Transports
|
||||||
var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment);
|
var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment);
|
||||||
// We're using the managed memory pool which is backed by managed buffers
|
// We're using the managed memory pool which is backed by managed buffers
|
||||||
Debug.Assert(isArray);
|
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
|
finally
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue