[management] ephemeral peers track on login (#5165)

This commit is contained in:
Vlad
2026-01-23 18:05:22 +01:00
committed by GitHub
parent ee3a67d2d8
commit 737d6061bf
4 changed files with 25 additions and 2 deletions

View File

@@ -728,6 +728,11 @@ func (am *DefaultAccountManager) AddPeer(ctx context.Context, accountID, setupKe
return fmt.Errorf("failed adding peer to All group: %w", err)
}
if temporary {
// we should track ephemeral peers to be able to clean them if the peer don't sync and be marked as connected
am.networkMapController.TrackEphemeralPeer(ctx, newPeer)
}
if addedByUser {
err := transaction.SaveUserLastLogin(ctx, accountID, userID, newPeer.GetLastLogin())
if err != nil {