mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
try fixing duplicate Routers In tunnel path
This commit is contained in:
parent
cf3bab996e
commit
32644ddada
@ -322,7 +322,7 @@ namespace tunnel
|
|||||||
i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
i2p::data::netdb.GetHighBandwidthRandomRouter (prevHop);
|
||||||
|
|
||||||
if (!hop || hop->GetProfile ()->IsBad ())
|
if (!hop || hop->GetProfile ()->IsBad ())
|
||||||
hop = i2p::data::netdb.GetRandomRouter ();
|
hop = i2p::data::netdb.GetRandomRouter (prevHop);
|
||||||
return hop;
|
return hop;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +331,6 @@ namespace tunnel
|
|||||||
if (m_ExplicitPeers) return SelectExplicitPeers (peers, isInbound);
|
if (m_ExplicitPeers) return SelectExplicitPeers (peers, isInbound);
|
||||||
auto prevHop = i2p::context.GetSharedRouterInfo ();
|
auto prevHop = i2p::context.GetSharedRouterInfo ();
|
||||||
int numHops = isInbound ? m_NumInboundHops : m_NumOutboundHops;
|
int numHops = isInbound ? m_NumInboundHops : m_NumOutboundHops;
|
||||||
#ifndef MESHNET
|
|
||||||
if (i2p::transport::transports.GetNumPeers () > 25)
|
if (i2p::transport::transports.GetNumPeers () > 25)
|
||||||
{
|
{
|
||||||
auto r = i2p::transport::transports.GetRandomPeer ();
|
auto r = i2p::transport::transports.GetRandomPeer ();
|
||||||
@ -342,7 +341,6 @@ namespace tunnel
|
|||||||
numHops--;
|
numHops--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
for (int i = 0; i < numHops; i++)
|
for (int i = 0; i < numHops; i++)
|
||||||
{
|
{
|
||||||
auto hop = SelectNextHop (prevHop);
|
auto hop = SelectNextHop (prevHop);
|
||||||
|
Loading…
Reference in New Issue
Block a user