diff --git a/MareSynchronos/MareSynchronos.csproj b/MareSynchronos/MareSynchronos.csproj index 64be999..dc52698 100644 --- a/MareSynchronos/MareSynchronos.csproj +++ b/MareSynchronos/MareSynchronos.csproj @@ -3,7 +3,7 @@ - 0.5.7 + 0.5.8 https://github.com/Penumbra-Sync/client diff --git a/MareSynchronos/WebAPI/ApIController.Functions.Files.cs b/MareSynchronos/WebAPI/ApIController.Functions.Files.cs index f78a562..e32a371 100644 --- a/MareSynchronos/WebAPI/ApIController.Functions.Files.cs +++ b/MareSynchronos/WebAPI/ApIController.Functions.Files.cs @@ -239,22 +239,13 @@ public partial class ApiController Logger.Debug($"Compressed {totalSize} to {compressedSize} ({(compressedSize / (double)totalSize):P2})"); Logger.Debug("Upload tasks complete, waiting for server to confirm"); - var anyUploadsOpen = await FilesIsUploadFinished().ConfigureAwait(false); - Logger.Debug("Uploads open: " + anyUploadsOpen); - double timeWaited = 0; + Logger.Debug("Uploads open: " + CurrentUploads.Any(c => c.IsInTransfer)); const double waitStep = 1.0d; - while (anyUploadsOpen && !uploadToken.IsCancellationRequested && timeWaited < 5) + while (CurrentUploads.Any(c => c.IsInTransfer) && !uploadToken.IsCancellationRequested) { - anyUploadsOpen = await FilesIsUploadFinished().ConfigureAwait(false); - timeWaited += waitStep; await Task.Delay(TimeSpan.FromSeconds(waitStep), uploadToken).ConfigureAwait(false); Logger.Debug("Waiting for uploads to finish"); } - - if(timeWaited > waitStep) - { - await FilesAbortUpload().ConfigureAwait(false); - } } foreach (var item in unverifiedUploadHashes)