I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit de1ca4ae authored by complication's avatar complication Committed by zzz
Browse files

2006-05-17 Complication

    * Fix some oversights in my previous changes:
      adjust some loglevels, make a few statements less wasteful,
      make one comparison less confusing and more likely to log unexpected values
parent a0f865fb
Branches
Tags
No related merge requests found
$Id: history.txt,v 1.476 2006-05-16 13:34:28 jrandom Exp $ $Id: history.txt,v 1.477 2006-05-17 22:01:21 jrandom Exp $
2006-05-17 Complication
* Fix some oversights in my previous changes:
adjust some loglevels, make a few statements less wasteful,
make one comparison less confusing and more likely to log unexpected values
2006-05-17 jrandom 2006-05-17 jrandom
* Make the peer page sortable * Make the peer page sortable
......
...@@ -15,9 +15,9 @@ import net.i2p.CoreVersion; ...@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.416 $ $Date: 2006-05-16 13:34:08 $"; public final static String ID = "$Revision: 1.417 $ $Date: 2006-05-17 22:00:49 $";
public final static String VERSION = "0.6.1.18"; public final static String VERSION = "0.6.1.18";
public final static long BUILD = 5; public final static long BUILD = 6;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID); System.out.println("Router ID: " + RouterVersion.ID);
......
...@@ -552,7 +552,7 @@ public class TunnelDispatcher implements Service { ...@@ -552,7 +552,7 @@ public class TunnelDispatcher implements Service {
long periodWithoutDrop = _context.clock().now() - _lastDropTime; long periodWithoutDrop = _context.clock().now() - _lastDropTime;
if (periodWithoutDrop < DROP_BASE_INTERVAL) { if (periodWithoutDrop < DROP_BASE_INTERVAL) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.error("Not dropping tunnel, since last drop was " + periodWithoutDrop + " ms ago!"); _log.warn("Not dropping tunnel, since last drop was " + periodWithoutDrop + " ms ago!");
return; return;
} }
...@@ -576,9 +576,9 @@ public class TunnelDispatcher implements Service { ...@@ -576,9 +576,9 @@ public class TunnelDispatcher implements Service {
if ((currentMessages > 20) && ((biggest == null) || (currentRate > biggestRate))) { if ((currentMessages > 20) && ((biggest == null) || (currentRate > biggestRate))) {
// Update our profile of the biggest // Update our profile of the biggest
biggest = current; biggest = current;
biggestMessages = biggest.getProcessedMessagesCount(); biggestMessages = currentMessages;
biggestAge = (_context.clock().now() - current.getCreation()); biggestAge = currentAge;
biggestRate = ((double) biggestMessages / (biggestAge / 1000)); biggestRate = currentRate;
} }
} }
...@@ -588,8 +588,8 @@ public class TunnelDispatcher implements Service { ...@@ -588,8 +588,8 @@ public class TunnelDispatcher implements Service {
return; return;
} }
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.WARN))
_log.error("Dropping tunnel with " + biggestRate + " messages/s and " + biggestMessages + _log.warn("Dropping tunnel with " + biggestRate + " messages/s and " + biggestMessages +
" messages, last drop was " + (periodWithoutDrop / 1000) + " s ago."); " messages, last drop was " + (periodWithoutDrop / 1000) + " s ago.");
remove(biggest); remove(biggest);
_lastDropTime = _context.clock().now() + _context.random().nextInt(DROP_RANDOM_BOOST); _lastDropTime = _context.clock().now() + _context.random().nextInt(DROP_RANDOM_BOOST);
......
...@@ -166,7 +166,7 @@ class BuildExecutor implements Runnable { ...@@ -166,7 +166,7 @@ class BuildExecutor implements Runnable {
return(0); return(0);
} else { } else {
// Mild overload, check if we already build tunnels // Mild overload, check if we already build tunnels
if (concurrent <= 0) { if (concurrent == 0) {
// We aren't building, allow 1 // We aren't building, allow 1
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Mild overload, allow building 1."); _log.warn("Mild overload, allow building 1.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment