File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1962,6 +1962,13 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
19621962 int nTries = 0 ;
19631963 while (!interruptNet)
19641964 {
1965+ // If we didn't find an appropriate destination after trying 100 addresses fetched from addrman,
1966+ // stop this loop, and let the outer loop run again (which sleeps, adds seed nodes, recalculates
1967+ // already-connected network ranges, ...) before trying new addrman addresses.
1968+ nTries++;
1969+ if (nTries > 100 )
1970+ break ;
1971+
19651972 CAddrInfo addr = addrman.SelectTriedCollision ();
19661973
19671974 // SelectTriedCollision returns an invalid address if it is empty.
@@ -1979,13 +1986,6 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
19791986 break ;
19801987 }
19811988
1982- // If we didn't find an appropriate destination after trying 100 addresses fetched from addrman,
1983- // stop this loop, and let the outer loop run again (which sleeps, adds seed nodes, recalculates
1984- // already-connected network ranges, ...) before trying new addrman addresses.
1985- nTries++;
1986- if (nTries > 100 )
1987- break ;
1988-
19891989 if (!IsReachable (addr))
19901990 continue ;
19911991
You can’t perform that action at this time.
0 commit comments