From b5e9c41d2de6e42d44c2e5d881738daa7ff2317b Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 2 Jan 2026 08:40:07 -0500 Subject: [PATCH] always try to build inbound tunnel through existing connection if limited connectivity --- libi2pd/TunnelPool.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libi2pd/TunnelPool.cpp b/libi2pd/TunnelPool.cpp index 15d79ce0..1af0bef2 100644 --- a/libi2pd/TunnelPool.cpp +++ b/libi2pd/TunnelPool.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2013-2025, The PurpleI2P Project +* Copyright (c) 2013-2026, The PurpleI2P Project * * This file is part of Purple i2pd project and licensed under BSD3 * @@ -590,7 +590,8 @@ namespace tunnel start++; } else if (i2p::transport::transports.GetNumPeers () > 100 || - (inbound && i2p::transport::transports.GetNumPeers () > 25)) + (inbound && (i2p::transport::transports.GetNumPeers () > 25 || + (i2p::context.IsLimitedConnectivity () && i2p::transport::transports.GetNumPeers () > 0)))) { auto r = i2p::transport::transports.GetRandomPeer (m_IsHighBandwidth && !i2p::context.IsLimitedConnectivity ()); if (r && r->IsECIES () && (!r->HasProfile () || !r->GetProfile ()->IsBad ()) &&