diff options
| author | Bond_009 <bond.009@outlook.com> | 2020-11-17 19:43:00 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2020-11-17 19:43:00 +0100 |
| commit | 4b1c9dc9eaa120a30a7820257a83dd5aa3ecd9f4 (patch) | |
| tree | ec02efd490c0b2f354990b5aec90887ce5e9b29a /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 08c2c86bc7debb306f492858ca6c7b3172300bd0 (diff) | |
Pass cancellation where possible
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ad3c19618..17b99c858 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1378,7 +1378,7 @@ namespace Emby.Server.Implementations using var response = await _httpClientFactory.CreateClient(NamedClient.Default) .SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false); + await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); var result = await System.Text.Json.JsonSerializer.DeserializeAsync<string>(stream, JsonDefaults.GetOptions(), cancellationToken).ConfigureAwait(false); var valid = string.Equals(Name, result, StringComparison.OrdinalIgnoreCase); |
