Browse Source

check profile only once

pull/189/head
orignal 10 years ago
parent
commit
7f172964f6
  1. 3
      NetDb.cpp
  2. 2
      TunnelPool.cpp

3
NetDb.cpp

@ -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 ();
}); });
} }

2
TunnelPool.cpp

@ -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…
Cancel
Save