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

pull/1645/head
orignal 3 years ago
parent 1d5d06f731
commit 820a365474

@ -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 () &&

Loading…
Cancel
Save