Browse Source

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

pull/1645/head
orignal 4 years ago
parent
commit
820a365474
  1. 3
      libi2pd/TunnelPool.cpp

3
libi2pd/TunnelPool.cpp

@ -417,7 +417,8 @@ namespace tunnel @@ -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