Fixed IDE1006
This commit is contained in:
parent
22e00bf42a
commit
3a1c722947
4 changed files with 5 additions and 5 deletions
|
@ -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 =
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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}");
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue