aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/RemoteImageController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-08-16 10:57:01 -0600
committercrobibero <cody@robibe.ro>2020-08-16 10:57:01 -0600
commit8da646e12b6122b3a73830eb9cbf3e39033d8ba3 (patch)
treeeda7f142c6b0eebb0587d133f0721d5ebd73c0e4 /Jellyfin.Api/Controllers/RemoteImageController.cs
parent8ddcd12348da48c8a07a7f897c014974995af6d9 (diff)
Dispose httpclient response
Diffstat (limited to 'Jellyfin.Api/Controllers/RemoteImageController.cs')
-rw-r--r--Jellyfin.Api/Controllers/RemoteImageController.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/RemoteImageController.cs b/Jellyfin.Api/Controllers/RemoteImageController.cs
index e5b038186..a203c50b9 100644
--- a/Jellyfin.Api/Controllers/RemoteImageController.cs
+++ b/Jellyfin.Api/Controllers/RemoteImageController.cs
@@ -245,7 +245,7 @@ namespace Jellyfin.Api.Controllers
private async Task DownloadImage(string url, Guid urlHash, string pointerCachePath)
{
var httpClient = _httpClientFactory.CreateClient();
- var response = await httpClient.GetAsync(url).ConfigureAwait(false);
+ using var response = await httpClient.GetAsync(url).ConfigureAwait(false);
var ext = response.Content.Headers.ContentType.MediaType.Split('/').Last();
var fullCachePath = GetFullCachePath(urlHash + "." + ext);