diff --git a/src/Ryujinx/Modules/Updater/Updater.cs b/src/Ryujinx/Modules/Updater/Updater.cs index bb4402fcd..1ecde83c5 100644 --- a/src/Ryujinx/Modules/Updater/Updater.cs +++ b/src/Ryujinx/Modules/Updater/Updater.cs @@ -12,7 +12,7 @@ namespace Ryujinx.Modules { private const string GitHubApiUrl = "https://api.github.com"; - private static readonly HttpClient httpClient = new HttpClient + private static readonly HttpClient _httpClient = new HttpClient { DefaultRequestHeaders = { diff --git a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs index 58d0a0923..054d775cd 100644 --- a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs +++ b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithMultipleThreads.cs @@ -99,7 +99,7 @@ namespace Ryujinx.Modules using var request = new HttpRequestMessage(HttpMethod.Get, url); request.Headers.Range = new RangeHeaderValue(start, end); - HttpResponseMessage response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false); + HttpResponseMessage response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false); using var stream = await response.Content.ReadAsStreamAsync(); using var memoryStream = new MemoryStream(); diff --git a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs index 24121c5dc..5c54e16d7 100644 --- a/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs +++ b/src/Ryujinx/Modules/Updater/Utils/DoUpdateWithSingleThread.cs @@ -21,9 +21,9 @@ namespace Ryujinx.Modules private static async Task DoUpdateWithSingleThreadWorker(TaskDialog taskDialog, string downloadUrl, string updateFile) { // We do not want to timeout while downloading - httpClient.Timeout = TimeSpan.FromDays(1); + _httpClient.Timeout = TimeSpan.FromDays(1); - HttpResponseMessage response = await httpClient.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead); + HttpResponseMessage response = await _httpClient.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead); if (!response.IsSuccessStatusCode) { Logger.Error?.Print(LogClass.Application, $"Failed to download file: {response.ReasonPhrase}"); diff --git a/src/Ryujinx/Modules/Updater/Utils/SendAsyncWithHeaders.cs b/src/Ryujinx/Modules/Updater/Utils/SendAsyncWithHeaders.cs index ba2554a8b..7228be23a 100644 --- a/src/Ryujinx/Modules/Updater/Utils/SendAsyncWithHeaders.cs +++ b/src/Ryujinx/Modules/Updater/Utils/SendAsyncWithHeaders.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Modules { request.Headers.Range = range; } - return await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); + return await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); } } }