mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 06:54:15 +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;
|
prevHop = hop;
|
||||||
start++;
|
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 ();
|
auto r = i2p::transport::transports.GetRandomPeer ();
|
||||||
if (r && !r->GetProfile ()->IsBad () &&
|
if (r && !r->GetProfile ()->IsBad () &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user