mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
improved tunnels creation ratio
This commit is contained in:
parent
a50a77435a
commit
3cc92f0a45
2 changed files with 7 additions and 5 deletions
|
@ -199,8 +199,9 @@ namespace tunnel
|
|||
|
||||
void TunnelPool::CreateInboundTunnel ()
|
||||
{
|
||||
OutboundTunnel * outboundTunnel = m_OutboundTunnels.size () > 0 ?
|
||||
*m_OutboundTunnels.begin () : tunnels.GetNextOutboundTunnel ();
|
||||
OutboundTunnel * outboundTunnel = GetNextOutboundTunnel ();
|
||||
if (!outboundTunnel)
|
||||
outboundTunnel = tunnels.GetNextOutboundTunnel ();
|
||||
LogPrint ("Creating destination inbound tunnel...");
|
||||
const i2p::data::RouterInfo * prevHop = &i2p::context.GetRouterInfo ();
|
||||
std::vector<const i2p::data::RouterInfo *> hops;
|
||||
|
@ -239,8 +240,9 @@ namespace tunnel
|
|||
|
||||
void TunnelPool::CreateOutboundTunnel ()
|
||||
{
|
||||
InboundTunnel * inboundTunnel = m_InboundTunnels.size () > 0 ?
|
||||
*m_InboundTunnels.begin () : tunnels.GetNextInboundTunnel ();
|
||||
InboundTunnel * inboundTunnel = GetNextInboundTunnel ();
|
||||
if (!inboundTunnel)
|
||||
inboundTunnel = tunnels.GetNextInboundTunnel ();
|
||||
if (inboundTunnel)
|
||||
{
|
||||
LogPrint ("Creating destination outbound tunnel...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue