1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

select random peer for first hop for outbound tunnel if number of connections < 100

This commit is contained in:
orignal 2021-03-16 18:45:51 -04:00
parent 1d5d06f731
commit 820a365474

View File

@ -417,7 +417,8 @@ namespace tunnel
prevHop = hop;
start++;
}
else if (i2p::transport::transports.GetNumPeers () > 25)
else if (i2p::transport::transports.GetNumPeers () > 100 ||
(inbound && i2p::transport::transports.GetNumPeers () > 25))
{
auto r = i2p::transport::transports.GetRandomPeer ();
if (r && !r->GetProfile ()->IsBad () &&