mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-02-23 07:24:21 +01:00
server: cleanup persistentPeerAddr when pruned
Delete all the stored addresses from the persistentPeerAddr map when we prune the persistent peer.
This commit is contained in:
@@ -2858,6 +2858,7 @@ func (s *server) prunePersistentPeerConnection(compressedPubKey [33]byte) {
|
||||
if perm, ok := s.persistentPeers[pubKeyStr]; ok && !perm {
|
||||
delete(s.persistentPeers, pubKeyStr)
|
||||
delete(s.persistentPeersBackoff, pubKeyStr)
|
||||
delete(s.persistentPeerAddrs, pubKeyStr)
|
||||
s.cancelConnReqs(pubKeyStr, nil)
|
||||
s.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user