mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Dispose httpclient response
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user