diff options
| author | Patrick Barron <barronpm@gmail.com> | 2024-02-06 09:37:02 -0500 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2024-02-06 09:37:02 -0500 |
| commit | 584636bdd8ea95d56b3c1cda97ce6efa8ce1543c (patch) | |
| tree | ddde20269c7a4133126eaa28aafbc03f2a5ed3ae /src | |
| parent | 604f4b2742416abf3149e95d8168b538ecb8b5f1 (diff) | |
Don't dispose HttpClients
Diffstat (limited to 'src')
| -rw-r--r-- | src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs index eaf5495c7..64b64c0ae 100644 --- a/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs +++ b/src/Jellyfin.LiveTv/Listings/SchedulesDirect.cs @@ -599,8 +599,9 @@ namespace Jellyfin.LiveTv.Listings CancellationToken cancellationToken, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) { - using var client = _httpClientFactory.CreateClient(NamedClient.Default); - using var response = await client.SendAsync(message, completionOption, cancellationToken).ConfigureAwait(false); + using var response = await _httpClientFactory.CreateClient(NamedClient.Default) + .SendAsync(message, completionOption, cancellationToken) + .ConfigureAwait(false); if (response.IsSuccessStatusCode) { return await response.Content.ReadFromJsonAsync<T>(_jsonOptions, cancellationToken).ConfigureAwait(false); @@ -665,8 +666,7 @@ namespace Jellyfin.LiveTv.Listings using var message = new HttpRequestMessage(HttpMethod.Put, ApiUrl + "/lineups/" + info.ListingsId); message.Headers.TryAddWithoutValidation("token", token); - using var client = _httpClientFactory.CreateClient(NamedClient.Default); - using var response = await client + using var response = await _httpClientFactory.CreateClient(NamedClient.Default) .SendAsync(message, HttpCompletionOption.ResponseHeadersRead, cancellationToken) .ConfigureAwait(false); |
