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:
zzz
2022-04-14 08:25:16 -04:00
parent 04b1bdb453
commit dda25bf1ed
3 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,20 @@
2022-04-14 zzz
* Startup: Don't set our RI loaded from disk if too old
2022-04-13 zzz
* Router:
- Reset uptime on soft restart
- Don't rekey after failure to store our RI due to clock skew
- Change comm system state during soft restart
2022-04-12 zzz
* Console: Fix Sybil closest hash tabs
* Transport: Fix UPnP deadlock
* Tunnels: Don't build client tunnels less than min length
2022-04-11 zzz
* I2CP: Fix external I2CP broken when session ID is 0
2022-04-05 zzz
* SSU2: Fragmented Session Confirmed

View File

@ -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 = "";

View File

@ -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) {