diff --git a/history.txt b/history.txt index 7cf6a5934..366616f32 100644 --- a/history.txt +++ b/history.txt @@ -1,5 +1,8 @@ 2013-08-30 zzz * Addresses: Treat Teredo addresses 2001:0::/32 as local + * Console: Display "accepting tunnels" instead of "rejecting tunnels" + after 20 minutes (ticket #902) + * NTCP: Handle race where peer's NTCP address goes away * SSU, confignet: Add support for specifiying multiple addresses * SusiDNS: Don't require last subscription to be terminated by newline (ticket #1000) diff --git a/router/java/src/net/i2p/router/RouterThrottleImpl.java b/router/java/src/net/i2p/router/RouterThrottleImpl.java index e1c767550..2f6df7e46 100644 --- a/router/java/src/net/i2p/router/RouterThrottleImpl.java +++ b/router/java/src/net/i2p/router/RouterThrottleImpl.java @@ -1,6 +1,7 @@ package net.i2p.router; import net.i2p.data.Hash; +import net.i2p.data.RouterInfo; import net.i2p.router.peermanager.TunnelHistory; import net.i2p.stat.Rate; import net.i2p.stat.RateAverages; @@ -16,7 +17,7 @@ import net.i2p.util.SimpleTimer; class RouterThrottleImpl implements RouterThrottle { protected final RouterContext _context; private final Log _log; - private String _tunnelStatus; + private volatile String _tunnelStatus; /** * arbitrary hard limit - if it's taking this long to get @@ -503,7 +504,16 @@ class RouterThrottleImpl implements RouterThrottle { /** @since 0.8.12 */ public void cancelShutdownStatus() { - setTunnelStatus(_x("Rejecting tunnels")); + // try hard to guess the state, before we actually get a request + int maxTunnels = _context.getProperty(PROP_MAX_TUNNELS, DEFAULT_MAX_TUNNELS); + RouterInfo ri = _context.router().getRouterInfo(); + if (maxTunnels > 0 && + !_context.router().isHidden() && + ri != null && !ri.getBandwidthTier().equals("K")) { + setTunnelStatus(_x("Accepting tunnels")); + } else { + setTunnelStatus(_x("Rejecting tunnels")); + } } public void setTunnelStatus(String msg) { diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 43dca9240..9319fc01c 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 = 21; + public final static long BUILD = 22; /** for example "-test" */ public final static String EXTRA = "";