Fixed IDE1006

This commit is contained in:
yell0wsuit 2024-04-17 16:50:57 +07:00
parent 22e00bf42a
commit 3a1c722947
No known key found for this signature in database
GPG key ID: 5B4F198A9800F6F4
4 changed files with 5 additions and 5 deletions

View file

@ -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 =
{

View file

@ -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();

View file

@ -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}");

View file

@ -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);
}
}
}