diff --git a/history.txt b/history.txt index 36cfbd6535..ebcba9093e 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,20 @@ +2022-01-06 zzz + * Router: Prevent deadlock at startup + +2022-01-05 zzz + * Plugins: + - Fix console icon when consoleLinkURL is specified + and different from the plugin name + - Fix webapp classpath setting when the webapp name + is different from the plugin name + +2022-01-04 zzz + * i2pcontrol: Send translated tunnel status string + +2022-01-02 zzz + * i2pcontrol: Handle more router states mapping to i2pcontrol states + * i2ptunnel: Add hooks to get the session from the contoller + 2021-12-28 zzz * Console: Partial string case-insensitive match for netdb family search * i2ptunnel: Add IRC filter support for IRCv3 message tags diff --git a/router/java/src/net/i2p/router/CommSystemFacade.java b/router/java/src/net/i2p/router/CommSystemFacade.java index 4a273270cd..0b7c70f399 100644 --- a/router/java/src/net/i2p/router/CommSystemFacade.java +++ b/router/java/src/net/i2p/router/CommSystemFacade.java @@ -176,6 +176,9 @@ public abstract class CommSystemFacade implements Service { /** @since 0.8.13 */ public boolean isDummy() { return true; } + /** @since 0.9.53 */ + public boolean isRunning() { return true; } + /** * Tell other transports our address changed */ diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 707cdcd348..6a9511fad2 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 = "Git"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 7; + public final static long BUILD = 8; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/networkdb/PublishLocalRouterInfoJob.java b/router/java/src/net/i2p/router/networkdb/PublishLocalRouterInfoJob.java index bebd33424f..ca1e285da8 100644 --- a/router/java/src/net/i2p/router/networkdb/PublishLocalRouterInfoJob.java +++ b/router/java/src/net/i2p/router/networkdb/PublishLocalRouterInfoJob.java @@ -69,6 +69,13 @@ public class PublishLocalRouterInfoJob extends JobImpl { public String getName() { return "Publish Local Router Info"; } public void runJob() { + if (!getContext().commSystem().isRunning()) { + // Avoid deadlock in the transports through here via FNDF.publish() at startup + if (_log.shouldWarn()) + _log.warn("PLRIJ before comm system started"); + requeue(100); + return; + } long last = getContext().netDb().getLastRouterInfoPublishTime(); long now = getContext().clock().now(); if (last + MIN_PUBLISH_DELAY > now) { diff --git a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java index b6247d4559..bd42472bae 100644 --- a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java +++ b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java @@ -86,6 +86,12 @@ public class CommSystemFacadeImpl extends CommSystemFacade { else _manager.restart(); } + + /** + * @since 0.9.53 + */ + @Override + public synchronized boolean isRunning() { return _wasStarted; } /** * How many peers are we currently connected to, that we have