From 3d6dac26f4172ab1dae016e01ea7ca94dad665a6 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 3 Jan 2019 18:28:01 +0100 Subject: Don't dispose the object we are returning --- Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs') diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index 60482780f..d3ba1b683 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -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; -- cgit v1.2.3