mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-05-25 16:24:47 +00:00
don't select non-connected peer for first hop if too many connection from that subnet
This commit is contained in:
@@ -578,7 +578,8 @@ namespace tunnel
|
||||
i2p::data::netdb.GetRandomRouter (prevHop, reverse, endpoint, false);
|
||||
if (hop)
|
||||
{
|
||||
if (!hop->HasProfile () || !hop->GetProfile ()->IsBad ())
|
||||
if ((!hop->HasProfile () || !hop->GetProfile ()->IsBad ()) &&
|
||||
(prevHop != i2p::context.GetSharedRouterInfo () || !i2p::transport::transports.IsTooManyConnectionsFromSubnet (hop)))
|
||||
break;
|
||||
}
|
||||
else if (tryClient)
|
||||
|
||||
Reference in New Issue
Block a user