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)
1962
1962
int nTries = 0 ;
1963
1963
while (!interruptNet)
1964
1964
{
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
+
1965
1972
CAddrInfo addr = addrman.SelectTriedCollision ();
1966
1973
1967
1974
// SelectTriedCollision returns an invalid address if it is empty.
@@ -1979,13 +1986,6 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
1979
1986
break ;
1980
1987
}
1981
1988
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
-
1989
1989
if (!IsReachable (addr))
1990
1990
continue ;
1991
1991
You can’t perform that action at this time.
0 commit comments