mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
check profile only once
This commit is contained in:
parent
b8b8d70c7f
commit
7f172964f6
2 changed files with 3 additions and 4 deletions
|
@ -905,8 +905,7 @@ namespace data
|
||||||
{
|
{
|
||||||
return !router->IsHidden () && router != compatibleWith &&
|
return !router->IsHidden () && router != compatibleWith &&
|
||||||
router->IsCompatible (*compatibleWith) &&
|
router->IsCompatible (*compatibleWith) &&
|
||||||
(router->GetCaps () & RouterInfo::eHighBandwidth) &&
|
(router->GetCaps () & RouterInfo::eHighBandwidth);
|
||||||
!router->GetProfile ()->IsBad ();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,7 @@ namespace tunnel
|
||||||
auto hop = isExploratory ? i2p::data::netdb.GetRandomRouter (prevHop):
|
auto hop = isExploratory ? i2p::data::netdb.GetRandomRouter (prevHop):
|
||||||
i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
||||||
|
|
||||||
if (!hop)
|
if (!hop || hop->GetProfile ()->IsBad ())
|
||||||
hop = i2p::data::netdb.GetRandomRouter ();
|
hop = i2p::data::netdb.GetRandomRouter ();
|
||||||
return hop;
|
return hop;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue