mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:17:22 +01:00
fix cancelled file uploads marked as verified, fix exception spam for portraits
This commit is contained in:
parent
dc48840352
commit
dc1e1c044a
2 changed files with 9 additions and 3 deletions
|
|
@ -156,14 +156,19 @@ public sealed class FileUploadManager : DisposableMediatorSubscriberBase
|
|||
await UploadFileStream(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
||||
else
|
||||
await UploadFileFull(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
||||
_verifiedUploadedHashes[fileHash] = DateTime.UtcNow;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!_mareConfigService.Current.UseAlternativeFileUpload)
|
||||
if (!_mareConfigService.Current.UseAlternativeFileUpload && ex is not OperationCanceledException)
|
||||
{
|
||||
Logger.LogWarning(ex, "[{hash}] Error during file upload, trying alternative file upload", fileHash);
|
||||
await UploadFileFull(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogWarning(ex, "[{hash}] File upload cancelled", fileHash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +251,6 @@ public sealed class FileUploadManager : DisposableMediatorSubscriberBase
|
|||
await uploadTask.ConfigureAwait(false);
|
||||
uploadTask = UploadFile(data.Item2, file.Hash, uploadToken);
|
||||
uploadToken.ThrowIfCancellationRequested();
|
||||
_verifiedUploadedHashes[file.Hash] = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
if (CurrentUploads.Any())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue