forked from I2P_Developers/i2p.i2p
2005-12-16 jrandom
* Added some I2PSnark sanity checks, an OOMListener when running standalone, and a guard against keeping memory tied up indefinitely. * Sanity check on the watchdog (thanks zzz!) * Handle invalid HTTP requests in I2PTunnel a little better
This commit is contained in:
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.310 $ $Date: 2005/12/13 16:56:42 $";
|
||||
public final static String ID = "$Revision: 1.311 $ $Date: 2005/12/14 04:32:51 $";
|
||||
public final static String VERSION = "0.6.1.7";
|
||||
public final static long BUILD = 4;
|
||||
public final static long BUILD = 5;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@@ -91,7 +91,14 @@ class RouterWatchdog implements Runnable {
|
||||
public void monitorRouter() {
|
||||
boolean ok = verifyJobQueueLiveliness();
|
||||
// If we aren't connected to the network that's why there's nobody to talk to
|
||||
int netErrors = (int) _context.statManager().getRate("udp.sendException").getRate(60*1000).getLastEventCount();
|
||||
long netErrors = 0;
|
||||
RateStat rs = _context.statManager().getRate("udp.sendException");
|
||||
if (rs != null) {
|
||||
Rate r = rs.getRate(60*1000);
|
||||
if (r != null)
|
||||
netErrors = r.getLastEventCount();
|
||||
}
|
||||
|
||||
ok = ok && (verifyClientLiveliness() || netErrors >= 5);
|
||||
|
||||
if (!ok) {
|
||||
|
Reference in New Issue
Block a user