do not use sendfiles when not necessary

This commit is contained in:
Stanley Dimant
2022-08-13 14:50:10 +02:00
parent 310dd4db5e
commit 110dbd7bdf
3 changed files with 75 additions and 49 deletions

View File

@@ -57,6 +57,7 @@ namespace MareSynchronos.WebAPI
_dalamudUtil.LogIn += DalamudUtilOnLogIn;
_dalamudUtil.LogOut += DalamudUtilOnLogOut;
ServerState = ServerState.Offline;
_verifiedUploadedHashes = new();
if (_dalamudUtil.IsLoggedIn)
{
@@ -141,6 +142,7 @@ namespace MareSynchronos.WebAPI
_connectionCancellationTokenSource.Cancel();
_connectionCancellationTokenSource = new CancellationTokenSource();
var token = _connectionCancellationTokenSource.Token;
_verifiedUploadedHashes.Clear();
while (ServerState is not ServerState.Connected && !token.IsCancellationRequested)
{
if (string.IsNullOrEmpty(SecretKey))