forked from I2P_Developers/i2p.i2p
Router: Restart fixes part 2
Don't set our RI loaded from disk if too old Rekeying was prevented by previous checkin, but this fixes root cause
This commit is contained in:
@@ -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 = 13;
|
||||
public final static long BUILD = 14;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
||||
@@ -131,6 +131,17 @@ class LoadRouterInfoJob extends JobImpl {
|
||||
fis1 = null;
|
||||
rif.delete();
|
||||
}
|
||||
if (_us != null) {
|
||||
long now = getContext().clock().now();
|
||||
long riTime = _us.getPublished();
|
||||
if (riTime > now || now - riTime > 45*60*1000) {
|
||||
// prevent netdb store failure and rekey
|
||||
_us = null;
|
||||
try { fis1.close(); } catch (IOException ioe2) {}
|
||||
fis1 = null;
|
||||
rif.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (keys2Exist || keysExist) {
|
||||
|
||||
Reference in New Issue
Block a user