[management] cancel peer expiration for account if account is gone (#8218)

This commit is contained in:
Pascal Fischer
2026-10-15 16:23:29 +02:00
committed by GitHub
parent 357d8a2a7c
commit 89c1b47e9c
3 changed files with 49 additions and 2 deletions
+6
View File
@@ -1702,6 +1702,9 @@ func (am *DefaultAccountManager) getNextPeerExpiration(ctx context.Context, acco
}
settings, err := am.Store.GetAccountSettings(ctx, store.LockingStrengthNone, accountID)
if isNotFound(err) {
return 0, false
}
if err != nil {
log.WithContext(ctx).Errorf("failed to get account settings: %v", err)
return peerSchedulerRetryInterval, true
@@ -1745,6 +1748,9 @@ func (am *DefaultAccountManager) getNextInactivePeerExpiration(ctx context.Conte
}
settings, err := am.Store.GetAccountSettings(ctx, store.LockingStrengthNone, accountID)
if isNotFound(err) {
return 0, false
}
if err != nil {
log.WithContext(ctx).Errorf("failed to get account settings: %v", err)
return peerSchedulerRetryInterval, true