mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
always check profile for peer selection
This commit is contained in:
parent
c873e9dd68
commit
76c54ffdef
4 changed files with 17 additions and 11 deletions
|
@ -263,11 +263,6 @@ 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 (!isExploratory && hop && hop->GetProfile ()->IsBad ())
|
||||
{
|
||||
LogPrint (eLogInfo, "Selected peer for tunnel has bad profile. Selecting another");
|
||||
hop = i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
||||
}
|
||||
|
||||
if (!hop)
|
||||
hop = i2p::data::netdb.GetRandomRouter ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue