diff --git a/history.txt b/history.txt index 3633628324b10e77b69b6f0e6d48fd1826f6913b..a9580a19297a8d7ef72faa436c67b2d95ad92f6f 100644 --- a/history.txt +++ b/history.txt @@ -9,6 +9,8 @@ * Tunnels: Use max of 2 not-failing peers in an exploratory tunnel, use high cap for the rest; change outbound exploratory default length from 2 + 0-1 to 3+0. + * Router: Fix soft restarts for 'massive' clock jumps (over +150s or -61s) and recover from standby + and hibernate (ticket #1014). 2015-09-25 dg * Rename _() for translation to _t() for Java 9 compatibility (ticket #1456) diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index a76d4b7fab37d2992df05a4c936a034ea1813dc4..fd68b7b698ea53c4a011deb342d5ea0d4fa46201 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -1443,8 +1443,10 @@ public class Router implements RouterClock.ClockShiftListener { _eventLog.addEvent(EventLog.CLOCK_SHIFT, Long.toString(delta)); // update the routing key modifier _context.routerKeyGenerator().generateDateBasedModData(); - if (_context.commSystem().countActivePeers() <= 0) - return; + // Commented because this check makes no sense (#1014) + // .. and 'active' is relative to our broken time. + //if (_context.commSystem().countActivePeers() <= 0) + // return; if (delta > 0) _log.error("Restarting after large clock shift forward by " + DataHelper.formatDuration(delta)); else diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 7ca1a3ec2c4e6b0a58a1f89cf73e6cb3036dcf84..5a58b19bc22ea9b489b5610aade18177efc4505e 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 = 10; + public final static long BUILD = 11; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/tasks/Restarter.java b/router/java/src/net/i2p/router/tasks/Restarter.java index c904cad507f6e4f9ac6c92fe1ee4af65a155ff27..23991ae0e1ae2d4a764a5cc34d0352aefcac2657 100644 --- a/router/java/src/net/i2p/router/tasks/Restarter.java +++ b/router/java/src/net/i2p/router/tasks/Restarter.java @@ -30,9 +30,9 @@ public class Restarter implements Runnable { log.logAlways(Log.WARN, "Stopping the tunnel manager"); try { _context.tunnelManager().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the tunnel manager", t); } - //try { _context.peerManager().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the peer manager", t); } + try { _context.peerManager().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the peer manager", t); } //try { _context.netDb().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the networkDb", t); } - //try { _context.jobQueue().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the job queue", t); } + try { _context.jobQueue().restart(); } catch (Throwable t) { log.log(Log.CRIT, "Error restarting the job queue", t); } log.logAlways(Log.WARN, "Router teardown complete, restarting the router..."); try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}