Console: Don't display I2CP error during soft restart (ticket #2468)

This commit is contained in:
zzz
2019-04-15 12:49:07 +00:00
parent d32d5b5f29
commit e42e04c0f0
2 changed files with 14 additions and 2 deletions

View File

@ -220,8 +220,10 @@ public class SummaryHelper extends HelperBase {
private NetworkStateMessage reachability() {
if (_context.commSystem().isDummy())
return new NetworkStateMessage(NetworkState.VMCOMM, "VM Comm System");
if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) &&
!_context.clientManager().isAlive())
if (_context.router().getUptime() > 60*1000 &&
!_context.clientManager().isAlive() &&
!_context.router().gracefulShutdownInProgress() &&
!_context.router().isRestarting())
return new NetworkStateMessage(NetworkState.ERROR, _t("ERR-Client Manager I2CP Error - check logs")); // not a router problem but the user should know
// Warn based on actual skew from peers, not update status, so if we successfully offset
// the clock, we don't complain.

View File

@ -832,6 +832,16 @@ public class Router implements RouterClock.ClockShiftListener {
}
}
/**
* @return true if router is RESTARTING (soft restart)
* @since 0.9.40
*/
public boolean isRestarting() {
synchronized(_stateLock) {
return _state == State.RESTARTING;
}
}
/**
* Only for Restarter, after soft restart is complete.
* Not for external use.