Skip to content

Commit

Permalink
potentially fix #115
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukks committed Nov 27, 2024
1 parent 5c6265e commit ba06a6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion BTCPayApp.Core/Backup/SyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ private async Task ContinuouslySync(bool local,
await SyncToLocal(cancellationToken);
else
await SyncToRemote( cancellationToken);
await Task.Delay(2000, cancellationToken);
}
catch (OperationCanceledException)
{
Expand All @@ -452,6 +451,10 @@ private async Task ContinuouslySync(bool local,
catch (Exception e)
{
_logger.LogError(e, "Error while syncing to {Local}", local ? "local" : "remote");
}finally
{
if(!cancellationToken.IsCancellationRequested)
await Task.Delay(2000, cancellationToken);
}
}
}
Expand Down

0 comments on commit ba06a6f

Please sign in to comment.