aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-01-03 18:28:01 +0100
committerBond_009 <bond.009@outlook.com>2019-01-03 18:28:01 +0100
commit3d6dac26f4172ab1dae016e01ea7ca94dad665a6 (patch)
tree0cbd6c76d182fd4ee353f90fe27a16ed9ec6a1b8
parent0bbc4f8219f3df020e505fc861f42f4f52e20766 (diff)
Don't dispose the object we are returning
-rw-r--r--Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs4
1 files changed, 2 insertions, 2 deletions
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;