From e193d8964f65966a3efa6a48d76f341628680616 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Thu, 6 Oct 2011 16:44:33 +0000 Subject: [PATCH] increase default SSU conn limit --- .../src/net/i2p/router/transport/TransportImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/TransportImpl.java b/router/java/src/net/i2p/router/transport/TransportImpl.java index e82951482b..375bbd7940 100644 --- a/router/java/src/net/i2p/router/transport/TransportImpl.java +++ b/router/java/src/net/i2p/router/transport/TransportImpl.java @@ -83,19 +83,23 @@ public abstract class TransportImpl implements Transport { * but SSU actually looks at idle time for countActivePeers() */ public int countPeers() { return countActivePeers(); } + /** * How many peers active in the last few minutes? */ public int countActivePeers() { return 0; } + /** * How many peers are we actively sending messages to (this minute) */ public int countActiveSendPeers() { return 0; } - /** Default is 500 for floodfills... */ + /** Default for floodfills... */ private static final int DEFAULT_MAX_CONNECTIONS = 425; + /** ...and 50/100/150/200/250 for BW Tiers K/L/M/N/O */ private static final int MAX_CONNECTION_FACTOR = 50; + /** Per-transport connection limit */ public int getMaxConnections() { String style = getStyle(); @@ -113,11 +117,13 @@ public abstract class TransportImpl implements Transport { } // increase limit for SSU, for now if (style.equals("udp")) - def = def * 3 / 2; + //def = def * 3 / 2; + def *= 2; return _context.getProperty("i2np." + style + ".maxConnections", def); } private static final int DEFAULT_CAPACITY_PCT = 75; + /** * Can we initiate or accept a connection to another peer, saving some margin */ @@ -138,6 +144,7 @@ public abstract class TransportImpl implements Transport { public Vector getClockSkews() { return new Vector(); } public List getMostRecentErrorMessages() { return Collections.EMPTY_LIST; } + /** * Nonblocking call to pull the next outbound message * off the queue. -- GitLab