Merge pull request #5839 from ellemouton/noDuplicateConnsForDupAddrs

server: use deduped addrMap for connReq creation
This commit is contained in:
Olaoluwa Osuntokun
2021-10-08 17:01:45 -07:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@ -3771,11 +3771,7 @@ func (s *server) connectToPersistentPeer(pubKeyStr string) {
// Any addresses left in addrMap are new ones that we have not made
// connection requests for. So create new connection requests for those.
for _, addr := range s.persistentPeerAddrs[pubKeyStr] {
if _, ok := addrMap[addr.String()]; !ok {
continue
}
for _, addr := range addrMap {
connReq := &connmgr.ConnReq{
Addr: addr,
Permanent: true,