mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 05:11:10 +00:00
check profile only once
This commit is contained in:
parent
b8b8d70c7f
commit
7f172964f6
@ -905,8 +905,7 @@ namespace data
|
||||
{
|
||||
return !router->IsHidden () && router != compatibleWith &&
|
||||
router->IsCompatible (*compatibleWith) &&
|
||||
(router->GetCaps () & RouterInfo::eHighBandwidth) &&
|
||||
!router->GetProfile ()->IsBad ();
|
||||
(router->GetCaps () & RouterInfo::eHighBandwidth);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -281,8 +281,8 @@ namespace tunnel
|
||||
bool isExploratory = (m_LocalDestination == &i2p::context); // TODO: implement it better
|
||||
auto hop = isExploratory ? i2p::data::netdb.GetRandomRouter (prevHop):
|
||||
i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
||||
|
||||
if (!hop)
|
||||
|
||||
if (!hop || hop->GetProfile ()->IsBad ())
|
||||
hop = i2p::data::netdb.GetRandomRouter ();
|
||||
return hop;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user