From 2af95886f85efb9b366a71b2097f7254a8a0711b Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Thu, 16 Jan 2025 21:33:32 +0100 Subject: [PATCH] reformat --- management/server/peer.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/management/server/peer.go b/management/server/peer.go index c0febc676..07f2629af 100644 --- a/management/server/peer.go +++ b/management/server/peer.go @@ -143,12 +143,6 @@ func (am *DefaultAccountManager) MarkPeerConnected(ctx context.Context, peerPubK return err } - if expired { - // we need to update other peers because when peer login expires all other peers are notified to disconnect from - // the expired one. Here we notify them that connection is now allowed again. - am.UpdateAccountPeers(ctx, accountID) - } - if peer.AddedWithSSOLogin() { if peer.LoginExpirationEnabled && settings.PeerLoginExpirationEnabled { am.checkAndSchedulePeerLoginExpiration(ctx, accountID) @@ -159,6 +153,12 @@ func (am *DefaultAccountManager) MarkPeerConnected(ctx context.Context, peerPubK } } + if expired { + // we need to update other peers because when peer login expires all other peers are notified to disconnect from + // the expired one. Here we notify them that connection is now allowed again. + am.UpdateAccountPeers(ctx, accountID) + } + return nil }