forked from I2P_Developers/i2p.i2p
Router: Don't reset uptime after a soft restart
Tunnels: Temporarily increase exploratory tunnel quantity at startup, so that netdb refresh will work better
This commit is contained in:
@ -1273,7 +1273,8 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
changeState(State.RESTARTING);
|
||||
}
|
||||
((RouterClock) _context.clock()).removeShiftListener(this);
|
||||
_started = _context.clock().now();
|
||||
// Let's not stop accepting tunnels, etc
|
||||
//_started = _context.clock().now();
|
||||
Thread t = new Thread(new Restarter(_context), "Router Restart");
|
||||
t.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
t.start();
|
||||
|
@ -52,6 +52,7 @@ public class TunnelPool {
|
||||
/** if less than one success in this many, reduce length (exploratory only) */
|
||||
private static final int BUILD_TRIES_LENGTH_OVERRIDE_1 = 10;
|
||||
private static final int BUILD_TRIES_LENGTH_OVERRIDE_2 = 18;
|
||||
private static final long STARTUP_TIME = 30*60*1000;
|
||||
|
||||
TunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPeerSelector sel) {
|
||||
_context = ctx;
|
||||
@ -348,6 +349,10 @@ public class TunnelPool {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_settings.isExploratory() && _context.router().getUptime() < STARTUP_TIME) {
|
||||
// more exploratory during startup, when we are refreshing the netdb RIs
|
||||
rv++;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user