2008-01-07 zzz
* profiles.jsp formatting cleanup * NTCP: Reduce max idle time from 60m to 20m * NTCP: Fix idle time on connections with zero messages, correctly drop these connections
This commit is contained in:
@ -1,4 +1,10 @@
|
|||||||
$Id: history.txt,v 1.610 2008-01-02 17:08:50 zzz Exp $
|
$Id: history.txt,v 1.611 2008-01-03 21:37:27 zzz Exp $
|
||||||
|
|
||||||
|
2008-01-07 zzz
|
||||||
|
* profiles.jsp formatting cleanup
|
||||||
|
* NTCP: Reduce max idle time from 60m to 20m
|
||||||
|
* NTCP: Fix idle time on connections with zero messages,
|
||||||
|
correctly drop these connections
|
||||||
|
|
||||||
2008-01-03 zzz
|
2008-01-03 zzz
|
||||||
* addressbook: Do basic validation of hostnames and destkeys
|
* addressbook: Do basic validation of hostnames and destkeys
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.545 $ $Date: 2008-01-02 17:08:48 $";
|
public final static String ID = "$Revision: 1.546 $ $Date: 2008-01-03 21:37:24 $";
|
||||||
public final static String VERSION = "0.6.1.30";
|
public final static String VERSION = "0.6.1.30";
|
||||||
public final static long BUILD = 17;
|
public final static long BUILD = 18;
|
||||||
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);
|
||||||
|
@ -91,12 +91,12 @@ class ProfileOrganizerRenderer {
|
|||||||
buf.append("<tr>");
|
buf.append("<tr>");
|
||||||
buf.append("<td><code>");
|
buf.append("<td><code>");
|
||||||
if (prof.getIsFailing()) {
|
if (prof.getIsFailing()) {
|
||||||
buf.append("<font color=\"red\">--").append(peer.toBase64().substring(0,6)).append("</font>");
|
buf.append("<font color=\"red\">-- ").append(peer.toBase64().substring(0,6)).append("</font>");
|
||||||
} else {
|
} else {
|
||||||
if (prof.getIsActive()) {
|
if (prof.getIsActive()) {
|
||||||
buf.append("<font color=\"blue\">++").append(peer.toBase64().substring(0,6)).append("</font>");
|
buf.append("<font color=\"blue\">++ ").append(peer.toBase64().substring(0,6)).append("</font>");
|
||||||
} else {
|
} else {
|
||||||
buf.append("__").append(peer.toBase64().substring(0,6));
|
buf.append(" ").append(peer.toBase64().substring(0,6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf.append("</code></td>");
|
buf.append("</code></td>");
|
||||||
|
@ -124,8 +124,8 @@ public class EventPumper implements Runnable {
|
|||||||
|
|
||||||
int failsafeWrites = 0;
|
int failsafeWrites = 0;
|
||||||
int failsafeCloses = 0;
|
int failsafeCloses = 0;
|
||||||
|
// pointless if we do this every 2 seconds?
|
||||||
long expireIdleWriteTime = 60*60*1000l + _context.random().nextLong(60*60*1000l);
|
long expireIdleWriteTime = 20*60*1000l; // + _context.random().nextLong(60*60*1000l);
|
||||||
for (Iterator iter = all.iterator(); iter.hasNext(); ) {
|
for (Iterator iter = all.iterator(); iter.hasNext(); ) {
|
||||||
try {
|
try {
|
||||||
SelectionKey key = (SelectionKey)iter.next();
|
SelectionKey key = (SelectionKey)iter.next();
|
||||||
@ -143,7 +143,7 @@ public class EventPumper implements Runnable {
|
|||||||
failsafeWrites++;
|
failsafeWrites++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (con.getTimeSinceSend() > expireIdleWriteTime) && (con.getMessagesSent() > 0) ) {
|
if ( con.getTimeSinceSend() > expireIdleWriteTime) {
|
||||||
// we haven't sent anything in a really long time, so lets just close 'er up
|
// we haven't sent anything in a really long time, so lets just close 'er up
|
||||||
con.close();
|
con.close();
|
||||||
failsafeCloses++;
|
failsafeCloses++;
|
||||||
|
@ -111,6 +111,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
|
|||||||
_context = ctx;
|
_context = ctx;
|
||||||
_log = ctx.logManager().getLog(getClass());
|
_log = ctx.logManager().getLog(getClass());
|
||||||
_created = System.currentTimeMillis();
|
_created = System.currentTimeMillis();
|
||||||
|
_lastSendTime = _created;
|
||||||
|
_lastReceiveTime = _created;
|
||||||
_transport = transport;
|
_transport = transport;
|
||||||
_chan = chan;
|
_chan = chan;
|
||||||
_readBufs = new ArrayList(4);
|
_readBufs = new ArrayList(4);
|
||||||
@ -204,8 +206,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
|
|||||||
return queued;
|
return queued;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public long getTimeSinceSend() { return _lastSendTime <= 0 ? 0 : System.currentTimeMillis()-_lastSendTime; }
|
public long getTimeSinceSend() { return System.currentTimeMillis()-_lastSendTime; }
|
||||||
public long getTimeSinceReceive() { return _lastReceiveTime <= 0 ? 0 : System.currentTimeMillis()-_lastReceiveTime; }
|
public long getTimeSinceReceive() { return System.currentTimeMillis()-_lastReceiveTime; }
|
||||||
public long getTimeSinceCreated() { return System.currentTimeMillis()-_created; }
|
public long getTimeSinceCreated() { return System.currentTimeMillis()-_created; }
|
||||||
public int getConsecutiveBacklog() { return _consecutiveBacklog; }
|
public int getConsecutiveBacklog() { return _consecutiveBacklog; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user