forked from I2P_Developers/i2p.i2p
* Console: Display "accepting tunnels" instead of "rejecting tunnels" after 20 minutes (ticket #902)
This commit is contained in:
@ -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)
|
||||
|
||||
|
@ -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,8 +504,17 @@ class RouterThrottleImpl implements RouterThrottle {
|
||||
|
||||
/** @since 0.8.12 */
|
||||
public void cancelShutdownStatus() {
|
||||
// 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) {
|
||||
_tunnelStatus = msg;
|
||||
|
@ -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 = "";
|
||||
|
Reference in New Issue
Block a user