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:
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…
x
Reference in New Issue
Block a user