Skip to content

Commit

Permalink
Sync: Handle invalid encryption key case
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Mar 7, 2025
1 parent 8012a81 commit 8bc4c07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BTCPayApp.Core/BTCPayServer/BTCPayConnectionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ private async Task OnConnectionChanged(object? sender, (BTCPayConnectionState Ol
break;
}
}
catch (System.Security.Cryptography.CryptographicException ex) when (newState is BTCPayConnectionState.Syncing or BTCPayConnectionState.Connecting)
{
logger.LogError(ex, "Error while changing connection state from {Old} to {New}", e.Old, e.New);
newState = BTCPayConnectionState.WaitingForEncryptionKey;
}
catch (Exception ex)
{
logger.LogError(ex, "Error while changing connection state from {Old} to {New}", e.Old, e.New);
Expand Down

0 comments on commit 8bc4c07

Please sign in to comment.