diff --git a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java index 2b123312b4bd8f94ced5072a0683030ee7a7353b..d6401ae48219adf9ba519bb2243988afee840cb4 100644 --- a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java +++ b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java @@ -27,6 +27,7 @@ import net.i2p.router.CommSystemFacade; import net.i2p.router.OutNetMessage; import net.i2p.router.RouterContext; import net.i2p.router.transport.udp.UDPTransport; +import net.i2p.router.util.EventLog; import net.i2p.util.Addresses; import net.i2p.util.Log; import net.i2p.util.SimpleScheduler; @@ -420,7 +421,10 @@ public class CommSystemFacadeImpl extends CommSystemFacade { public void timeReached() { boolean good = Addresses.isConnected(); - _netMonitorStatus = good; + if (_netMonitorStatus != good) { + _context.router().eventLog().addEvent(EventLog.NETWORK, good ? "connected" : "disconnected"); + _netMonitorStatus = good; + } reschedule(good ? LONG_DELAY : SHORT_DELAY); } } diff --git a/router/java/src/net/i2p/router/util/EventLog.java b/router/java/src/net/i2p/router/util/EventLog.java index 5e58e7c3abc91ca715b5e58de6407e65b5d470b8..1c2f3139e47f332964aad15b2dc725819dcb3993 100644 --- a/router/java/src/net/i2p/router/util/EventLog.java +++ b/router/java/src/net/i2p/router/util/EventLog.java @@ -40,6 +40,7 @@ public class EventLog { public static final String CRITICAL = "critical"; public static final String INSTALLED = "installed"; public static final String INSTALL_FAILED = "intallFailed"; + public static final String NETWORK = "network"; public static final String NEW_IDENT = "newIdent"; public static final String OOM = "oom"; public static final String REKEYED = "rekeyed";