mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
Tunnels: Use connected peer for closest inbound hop when
approaching conn limits to increase tunnel build success This should reduce chances of tunnel builds pushing us over conn limits, and reduce build failures and watchdog warnings when at conn limits.
This commit is contained in:
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 4;
|
||||
public final static long BUILD = 5;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
||||
@@ -53,7 +53,8 @@ class ClientPeerSelector extends TunnelPeerSelector {
|
||||
boolean ssuDisabled = isSSUDisabled();
|
||||
boolean checkClosestHop = v6Only || ntcpDisabled || ssuDisabled;
|
||||
boolean hidden = ctx.router().isHidden() ||
|
||||
ctx.router().getRouterInfo().getAddressCount() <= 0;
|
||||
ctx.router().getRouterInfo().getAddressCount() <= 0 ||
|
||||
!ctx.commSystem().haveInboundCapacity(95);
|
||||
boolean hiddenInbound = hidden && isInbound;
|
||||
boolean hiddenOutbound = hidden && !isInbound;
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ class ExploratoryPeerSelector extends TunnelPeerSelector {
|
||||
boolean ssuDisabled = nonzero && isSSUDisabled();
|
||||
boolean checkClosestHop = v6Only || ntcpDisabled || ssuDisabled;
|
||||
boolean hidden = nonzero && (ctx.router().isHidden() ||
|
||||
ctx.router().getRouterInfo().getAddressCount() <= 0);
|
||||
ctx.router().getRouterInfo().getAddressCount() <= 0 ||
|
||||
!ctx.commSystem().haveInboundCapacity(95));
|
||||
boolean hiddenInbound = hidden && isInbound;
|
||||
boolean hiddenOutbound = hidden && !isInbound;
|
||||
boolean lowOutbound = nonzero && !isInbound && !ctx.commSystem().haveHighOutboundCapacity();
|
||||
|
||||
Reference in New Issue
Block a user