Use global login expiration setting when sending network map (#731)

Peers were considered expired and not sent to remote peers
when global expiration was disabled.
This commit is contained in:
Misha Bragin
2023-03-09 11:24:42 +01:00
committed by GitHub
parent c65a5acab9
commit 9ce8056b17
5 changed files with 126 additions and 2 deletions

View File

@@ -314,7 +314,7 @@ func (a *Account) GetPeerNetworkMap(peerID, dnsDomain string) *NetworkMap {
var expiredPeers []*Peer
for _, p := range aclPeers {
expired, _ := p.LoginExpired(a.Settings.PeerLoginExpiration)
if expired {
if a.Settings.PeerLoginExpirationEnabled && expired {
expiredPeers = append(expiredPeers, p)
continue
}