From cf3bab996ef87ed6cee6675d5bfa92e3128a7b2d Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 27 Jun 2016 14:00:04 -0400 Subject: [PATCH] when routers < 5 and in meshnet mode do not select random peers --- TunnelPool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TunnelPool.cpp b/TunnelPool.cpp index 5e7e8ec4..02adf8a1 100644 --- a/TunnelPool.cpp +++ b/TunnelPool.cpp @@ -331,6 +331,7 @@ namespace tunnel if (m_ExplicitPeers) return SelectExplicitPeers (peers, isInbound); auto prevHop = i2p::context.GetSharedRouterInfo (); int numHops = isInbound ? m_NumInboundHops : m_NumOutboundHops; +#ifndef MESHNET if (i2p::transport::transports.GetNumPeers () > 25) { auto r = i2p::transport::transports.GetRandomPeer (); @@ -341,7 +342,7 @@ namespace tunnel numHops--; } } - +#endif for (int i = 0; i < numHops; i++) { auto hop = SelectNextHop (prevHop);