mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 00:24:14 +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
|
|
@ -239,7 +239,9 @@ public class DalamudUtilService : IHostedService
|
||||||
{
|
{
|
||||||
if (_clientState.LocalPlayer?.IsDead ?? false) return;
|
if (_clientState.LocalPlayer?.IsDead ?? false) return;
|
||||||
|
|
||||||
_playerCharas = _performanceCollector.LogPerformance(this, "ObjTableToCharas", () => _objectTable.OfType<PlayerCharacter>().ToDictionary(p => p.GetHash256(), p => (p.Name.ToString(), p.Address), StringComparer.Ordinal));
|
_playerCharas = _performanceCollector.LogPerformance(this, "ObjTableToCharas",
|
||||||
|
() => _objectTable.OfType<PlayerCharacter>().Where(o => o.ObjectIndex < 240)
|
||||||
|
.ToDictionary(p => p.GetHash256(), p => (p.Name.ToString(), p.Address), StringComparer.Ordinal));
|
||||||
|
|
||||||
if (GposeTarget != null && !IsInGpose)
|
if (GposeTarget != null && !IsInGpose)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -156,14 +156,19 @@ public sealed class FileUploadManager : DisposableMediatorSubscriberBase
|
||||||
await UploadFileStream(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
await UploadFileStream(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
||||||
else
|
else
|
||||||
await UploadFileFull(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
await UploadFileFull(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
||||||
|
_verifiedUploadedHashes[fileHash] = DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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);
|
Logger.LogWarning(ex, "[{hash}] Error during file upload, trying alternative file upload", fileHash);
|
||||||
await UploadFileFull(compressedFile, fileHash, uploadToken).ConfigureAwait(false);
|
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);
|
await uploadTask.ConfigureAwait(false);
|
||||||
uploadTask = UploadFile(data.Item2, file.Hash, uploadToken);
|
uploadTask = UploadFile(data.Item2, file.Hash, uploadToken);
|
||||||
uploadToken.ThrowIfCancellationRequested();
|
uploadToken.ThrowIfCancellationRequested();
|
||||||
_verifiedUploadedHashes[file.Hash] = DateTime.UtcNow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrentUploads.Any())
|
if (CurrentUploads.Any())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue