Skip to content
/ i2pd Public
forked from PurpleI2P/i2pd

Commit

Permalink
don't create paired inbound tunnel if length is different
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jul 17, 2023
1 parent 940a97d commit e7157cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libi2pd/TunnelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,12 @@ namespace tunnel
for (const auto& it : m_InboundTunnels)
if (it->IsEstablished ()) num++;
}
if (!num && !m_OutboundTunnels.empty () && m_NumOutboundHops > 0)
if (!num && !m_OutboundTunnels.empty () && m_NumOutboundHops > 0 &&
m_NumInboundHops == m_NumOutboundHops)
{
for (auto it: m_OutboundTunnels)
{
// try to create inbound tunnel through the same path as succesive outbound
CreatePairedInboundTunnel (it);
num++;
if (num >= m_NumInboundTunnels) break;
Expand Down

0 comments on commit e7157cf

Please sign in to comment.