Minor cleanups, -15
This commit is contained in:
@ -17,7 +17,7 @@ import net.i2p.CoreVersion;
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
|
||||
public final static String VERSION = "0.6.1.32";
|
||||
public final static long BUILD = 14;
|
||||
public final static long BUILD = 15;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -257,15 +257,15 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
}
|
||||
_lease = (Lease) _leaseCache.get(_to);
|
||||
if (_lease != null) {
|
||||
if (!_lease.isExpired()) {
|
||||
// if outbound tunnel length == 0 && lease.firsthop.isBacklogged() don't use it ??
|
||||
if (!_lease.isExpired(Router.CLOCK_FUDGE_FACTOR)) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Found in cache - lease for " + _toString);
|
||||
return true;
|
||||
} else {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Expired from cache - lease for " + _toString);
|
||||
_leaseCache.remove(_to);
|
||||
}
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Expired from cache - lease for " + _toString);
|
||||
_leaseCache.remove(_to);
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,7 +484,7 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
for (Iterator iter = tc.keySet().iterator(); iter.hasNext(); ) {
|
||||
Destination dest = (Destination) iter.next();
|
||||
Lease l = (Lease) tc.get(dest);
|
||||
if (l.isExpired())
|
||||
if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))
|
||||
deleteList.add(dest);
|
||||
}
|
||||
for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
|
||||
@ -599,8 +599,8 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
|
||||
long sendTime = getContext().clock().now() - _start;
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn(getJobId() + ": Failed to send the message " + _clientMessageId + " after "
|
||||
+ sendTime + "ms");
|
||||
_log.warn(getJobId() + ": Failed to send the message " + _clientMessageId + " to " + _toString +
|
||||
" after " + sendTime + "ms");
|
||||
|
||||
long messageDelay = getContext().throttle().getMessageDelay();
|
||||
long tunnelLag = getContext().throttle().getTunnelLag();
|
||||
|
@ -286,13 +286,13 @@ class ProfileOrganizerRenderer {
|
||||
String avg (PeerProfile prof, long rate) {
|
||||
RateStat rs = prof.getDbResponseTime();
|
||||
if (rs == null)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
Rate r = rs.getRate(rate);
|
||||
if (r == null)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
long c = r.getCurrentEventCount() + r.getLastEventCount();
|
||||
if (c == 0)
|
||||
return num(0d);
|
||||
return "0ms";
|
||||
double d = r.getCurrentTotalValue() + r.getLastTotalValue();
|
||||
return Math.round(d/c) + "ms";
|
||||
}
|
||||
|
@ -599,6 +599,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
|
||||
return;
|
||||
// if (_outbound.indexOf(msg) > 0)
|
||||
// _log.debug("Priority message sent, pri = " + msg.getPriority() + " pos = " + _outbound.indexOf(msg) + "/" +_outbound.size());
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Type " + msg.getMessage().getType() + " pri " + msg.getPriority() + " slot " + _outbound.indexOf(msg));
|
||||
_outbound.remove(msg);
|
||||
}
|
||||
_currentOutbound = msg;
|
||||
|
Reference in New Issue
Block a user