change namings, port, fix clearing uploads

This commit is contained in:
Stanley Dimant
2022-07-01 11:29:19 +02:00
parent 320b80e3ae
commit 35b12720c6
4 changed files with 38 additions and 8 deletions

View File

@@ -24,7 +24,8 @@ namespace MareSynchronos.WebAPI
{
Logger.Warn("Cancelling upload");
_uploadCancellationTokenSource?.Cancel();
_fileHub!.InvokeAsync("AbortUpload");
_fileHub!.SendAsync("AbortUpload");
CurrentUploads.Clear();
}
}
@@ -167,7 +168,7 @@ namespace MareSynchronos.WebAPI
Logger.Verbose("Compressing and uploading " + file);
var data = await GetCompressedFileData(file.Hash, uploadToken);
CurrentUploads.Single(e => e.Hash == data.Item1).Total = data.Item2.Length;
_ = UploadFile(data.Item2, file.Hash, uploadToken);
await UploadFile(data.Item2, file.Hash, uploadToken);
if (!uploadToken.IsCancellationRequested) continue;
Logger.Warn("Cancel in filesToUpload loop detected");
CurrentUploads.Clear();

View File

@@ -17,7 +17,7 @@ namespace MareSynchronos.WebAPI
{
#if DEBUG
public const string MainServer = "darkarchons Debug Server (Dev Server (CH))";
public const string MainServiceUri = "wss://darkarchon.internet-box.ch:5001";
public const string MainServiceUri = "wss://darkarchon.internet-box.ch:5000";
#else
public const string MainServer = "Lunae Crescere Incipientis (Central Server EU)";
public const string MainServiceUri = "to be defined";