forked from I2P_Developers/i2p.i2p
Transport: Don't record reachability changes in event log shortly after startup
This commit is contained in:
@@ -1534,9 +1534,10 @@ public class NTCPTransport extends TransportImpl {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Old status: " + old + " New status: " + status +
|
||||
" from: ", new Exception("traceback"));
|
||||
if (old != Status.UNKNOWN)
|
||||
if (old != Status.UNKNOWN && _context.router().getUptime() > 5*60*1000L) {
|
||||
_context.router().eventLog().addEvent(EventLog.REACHABILITY,
|
||||
"from " + _t(old.toStatusString()) + " to " + _t(status.toStatusString()));
|
||||
}
|
||||
}
|
||||
_context.router().rebuildRouterInfo();
|
||||
}
|
||||
|
||||
@@ -3288,9 +3288,10 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
_log.warn("Old status: " + old + " New status: " + status +
|
||||
" Caused by update: " + newStatus +
|
||||
" from: ", new Exception("traceback"));
|
||||
if (old != Status.UNKNOWN)
|
||||
if (old != Status.UNKNOWN && _context.router().getUptime() > 5*60*1000L) {
|
||||
_context.router().eventLog().addEvent(EventLog.REACHABILITY,
|
||||
"from " + _t(old.toStatusString()) + " to " + _t(status.toStatusString()));
|
||||
}
|
||||
// Always rebuild when the status changes, even if our address hasn't changed,
|
||||
// as rebuildExternalAddress() calls replaceAddress() which calls CSFI.notifyReplaceAddress()
|
||||
// which will start up NTCP inbound when we transition to OK.
|
||||
|
||||
Reference in New Issue
Block a user