Don't dispose the object we are returning

This commit is contained in:
Bond_009 2019-01-03 18:28:01 +01:00
parent 0bbc4f8219
commit 3d6dac26f4

View File

@ -322,8 +322,8 @@ namespace Emby.Server.Implementations.HttpClientManager
_fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(responseCachePath));
using (var responseStream = response.Content)
using (var memoryStream = new MemoryStream())
{
var memoryStream = new MemoryStream();
await responseStream.CopyToAsync(memoryStream).ConfigureAwait(false);
memoryStream.Position = 0;
@ -430,8 +430,8 @@ namespace Emby.Server.Implementations.HttpClientManager
options.CancellationToken.ThrowIfCancellationRequested();
using (var stream = httpResponse.GetResponseStream())
using (var memoryStream = new MemoryStream())
{
var memoryStream = new MemoryStream();
await stream.CopyToAsync(memoryStream).ConfigureAwait(false);
memoryStream.Position = 0;