mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 02:34:14 +01:00
fix transfer progress, add glamourer unlock by name, fix dtrbar, add to xlplugins main
This commit is contained in:
parent
706aab5bb9
commit
864c76d258
8 changed files with 48 additions and 30 deletions
|
|
@ -121,7 +121,7 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
|
|||
Logger.LogDebug("Downloading {requestUrl} for request {id}", requestUrl, requestId);
|
||||
try
|
||||
{
|
||||
response = await _orchestrator.SendRequestAsync(HttpMethod.Get, requestUrl, ct).ConfigureAwait(false);
|
||||
response = await _orchestrator.SendRequestAsync(HttpMethod.Get, requestUrl, ct, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
|
||||
response.EnsureSuccessStatusCode();
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
|
|
@ -142,7 +142,8 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
|
|||
var buffer = new byte[bufferSize];
|
||||
|
||||
var bytesRead = 0;
|
||||
while ((bytesRead = await (await response.Content.ReadAsStreamAsync(ct).ConfigureAwait(false)).ReadAsync(buffer, ct).ConfigureAwait(false)) > 0)
|
||||
var stream = await response.Content.ReadAsStreamAsync(ct).ConfigureAwait(false);
|
||||
while ((bytesRead = await stream.ReadAsync(buffer, ct).ConfigureAwait(false)) > 0)
|
||||
{
|
||||
ct.ThrowIfCancellationRequested();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue