zzz.i2p

Development discussions
 
Sun, 18 Nov 2018, 01:46pm #1
oerxl
Contributor

Hi,
I use my own program to adjust the upload bandwidth according to my local congestion (pinging my provider) and wanted to used RouterWatchdog so save some pings.
But I found that RouterWatchdog seems to be a bit off, barking when there is nothing.

net.i2p.router.tasks.RouterWatchdog, line ca. 130
public void monitorRouter() {
[...]
final RateStat rs = _context.statManager().getRate("udp.sendException");
final Rate r = rs.getRate(60 * 1000);
netErrors = r.getLastEventCount();
ok = ok && (verifyClientLiveliness() || netErrors >= 5);

shouldn't this be:

ok = ok && verifyClientLiveliness() && netErrors <=5;

?

Sun, 18 Nov 2018, 02:06pm #2
zzz
Administrator
Zzz

will take a closer look. That line is from jrandom, 2005

Sun, 18 Nov 2018, 02:09pm #3
zzz
Administrator
Zzz

It's correct as is. We don't want the watchdog to start barking if it's a network problem - we have other mechanisms to detect and log network problems. Your use case is apparently different.

Sun, 18 Nov 2018, 04:54pm #4
oerxl
Contributor

zzz wrote:

It's correct as is. We don't want the watchdog to start barking if it's a network problem - we have other mechanisms to detect and log network problems. Your use case is apparently different.

Understood, thanks zzz!