Skip to content
/ i2pd Public
forked from PurpleI2P/i2pd

Commit

Permalink
allow 0 hops with explicitPeers
Browse files Browse the repository at this point in the history
  • Loading branch information
Vort committed Jul 19, 2023
1 parent 0754255 commit f13cc0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libi2pd/TunnelPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ namespace tunnel

bool TunnelPool::SelectExplicitPeers (Path& path, bool isInbound)
{
if (!m_ExplicitPeers->size ()) return false;
int numHops = isInbound ? m_NumInboundHops : m_NumOutboundHops;
if (numHops > (int)m_ExplicitPeers->size ()) numHops = m_ExplicitPeers->size ();
if (!numHops) return false;
for (int i = 0; i < numHops; i++)
{
auto& ident = (*m_ExplicitPeers)[i];
Expand Down

0 comments on commit f13cc0b

Please sign in to comment.