MemoryStream optimizations

This commit is contained in:
Bond_009
2020-08-07 17:38:01 +02:00
committed by Bond-009
parent 75bb127599
commit 371a09c60b
7 changed files with 36 additions and 26 deletions

View File

@@ -95,13 +95,13 @@ namespace Emby.Server.Implementations.HttpServer
if (bytes != null)
{
await responseStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
await responseStream.WriteAsync(bytes, 0, bytes.Length, cancellationToken).ConfigureAwait(false);
}
else
{
using (var src = SourceStream)
{
await src.CopyToAsync(responseStream).ConfigureAwait(false);
await src.CopyToAsync(responseStream, cancellationToken).ConfigureAwait(false);
}
}
}