I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 8a69dc0a authored by zzz's avatar zzz
Browse files

only log reseed network disconnected warning once

parent 39dc60cf
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ public class ReseedChecker { ...@@ -31,6 +31,7 @@ public class ReseedChecker {
private final AtomicBoolean _inProgress = new AtomicBoolean(); private final AtomicBoolean _inProgress = new AtomicBoolean();
private volatile String _lastStatus = ""; private volatile String _lastStatus = "";
private volatile String _lastError = ""; private volatile String _lastError = "";
private volatile boolean _networkLogged;
public static final int MINIMUM = 50; public static final int MINIMUM = 50;
private static final long STATUS_CLEAN_TIME = 20*60*1000; private static final long STATUS_CLEAN_TIME = 20*60*1000;
...@@ -79,9 +80,13 @@ public class ReseedChecker { ...@@ -79,9 +80,13 @@ public class ReseedChecker {
File noReseedFileAlt3 = new File(_context.getConfigDir(), "noreseed.i2p"); File noReseedFileAlt3 = new File(_context.getConfigDir(), "noreseed.i2p");
if (!noReseedFile.exists() && !noReseedFileAlt1.exists() && !noReseedFileAlt2.exists() && !noReseedFileAlt3.exists()) { if (!noReseedFile.exists() && !noReseedFileAlt1.exists() && !noReseedFileAlt2.exists() && !noReseedFileAlt3.exists()) {
if (!Addresses.isConnected()) { if (!Addresses.isConnected()) {
_log.logAlways(Log.WARN, "Cannot reseed, no network connection"); if (!_networkLogged) {
_log.logAlways(Log.WARN, "Cannot reseed, no network connection");
_networkLogged = true;
}
return false; return false;
} }
_networkLogged = false;
if (count <= 1) if (count <= 1)
_log.logAlways(Log.INFO, "Downloading peer router information for a new I2P installation"); _log.logAlways(Log.INFO, "Downloading peer router information for a new I2P installation");
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment