From d148efd4589bb4ad3e289b88e5008377370bcbc9 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 21 Jun 2012 20:08:02 +0000 Subject: [PATCH] * TunnelPoolManager: Use one ClientPeerSelector for all pools --- history.txt | 21 +++++++++++++++++++ .../src/net/i2p/router/RouterVersion.java | 2 +- .../router/tunnel/pool/TunnelPoolManager.java | 8 +++---- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/history.txt b/history.txt index 6734f3335..1ed3d87e1 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,24 @@ +2012-06-21 zzz + * I2CP: Make separate message ID counters per-destination, use atomic, + increase max (could have caused "local loopback" problems) + * OCMOSJ, ElG, Streaming: log tweaks + * TunnelInfo: Change msg counter from long to int + * TunnelPoolManager: Use one ClientPeerSelector for all pools + +2012-06-20 zzz + * I2PSession: + - Greatly simplify the VerifyUsage timers + - Constructor cleanup + +2012-06-19 zzz + * i2psnark: + - Hide buttons while stopping all + * Socks: Pass remote port through + * Streaming: + - Listen only on local port if set + - Listen only for streaming protocol if configured (new option) + - Javadocs re: ports + 2012-06-18 zzz * i2psnark: - Improve torrent shutdown handling to maximize chance of diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index e1f87e077..8ab24107c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 16; + public final static long BUILD = 17; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java index 671a3e16b..66080501c 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java +++ b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java @@ -41,6 +41,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { private TunnelPool _outboundExploratory; private final BuildExecutor _executor; private final BuildHandler _handler; + private final TunnelPeerSelector _clientPeerSelector; private boolean _isShutdown; private final int _numHandlerThreads; private static final long[] RATES = { 60*1000, 10*60*1000l, 60*60*1000l }; @@ -60,6 +61,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { _clientInboundPools = new ConcurrentHashMap(4); _clientOutboundPools = new ConcurrentHashMap(4); + _clientPeerSelector = new ClientPeerSelector(); _executor = new BuildExecutor(ctx, this); I2PThread execThread = new I2PThread(_executor, "BuildExecutor", true); @@ -407,8 +409,6 @@ public class TunnelPoolManager implements TunnelManagerFacade { settings.getOutboundSettings().setDestination(dest); TunnelPool inbound = null; TunnelPool outbound = null; - // should we share the clientPeerSelector across both inbound and outbound? - // or just one for all clients? why separate? boolean delayOutbound = false; // synch with removeTunnels() below @@ -416,7 +416,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { inbound = _clientInboundPools.get(dest); if (inbound == null) { inbound = new TunnelPool(_context, this, settings.getInboundSettings(), - new ClientPeerSelector()); + _clientPeerSelector); _clientInboundPools.put(dest, inbound); } else { inbound.setSettings(settings.getInboundSettings()); @@ -424,7 +424,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { outbound = _clientOutboundPools.get(dest); if (outbound == null) { outbound = new TunnelPool(_context, this, settings.getOutboundSettings(), - new ClientPeerSelector()); + _clientPeerSelector); _clientOutboundPools.put(dest, outbound); delayOutbound = true; } else {