mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 13:11:40 +00:00
always try to build inbound tunnel through existing connection if limited connectivity
This commit is contained in:
1 parent
d11d312bd5
commit
b5e9c41d2d
1 file changed
+3
-2
@@ -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 ()) &&
|
||||
|
||||
Reference in new issue
Block a user