2004-12-28 jrandom

* Cleaned up the resending and choking algorithm in the streaming lib.
    * Removed the read timeout override for I2PTunnel's httpclient, allowing
      it to use the default for the streaming lib.
    * Revised ack triggers in the streaming lib.
    * Logging.
This commit is contained in:
jrandom
2004-12-29 15:53:28 +00:00
committed by zzz
parent 484b528d4f
commit 1503ee2dfa
11 changed files with 81 additions and 37 deletions

View File

@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.122 $ $Date: 2004/12/21 11:32:50 $";
public final static String ID = "$Revision: 1.123 $ $Date: 2004/12/21 13:23:03 $";
public final static String VERSION = "0.4.2.5";
public final static long BUILD = 0;
public final static long BUILD = 1;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@@ -168,10 +168,16 @@ public class TCPConnection {
msg.timestamp("TCPConnection.addMessage");
List expired = null;
int remaining = 0;
long remainingSize = 0;
synchronized (_pendingMessages) {
_pendingMessages.add(msg);
expired = locked_expireOld();
locked_throttle();
for (int i = 0; i < _pendingMessages.size(); i++) {
OutNetMessage cur = (OutNetMessage)_pendingMessages.get(i);
remaining++;
remainingSize += cur.getMessageSize();
}
remaining = _pendingMessages.size();
_pendingMessages.notifyAll();
}
@@ -182,8 +188,8 @@ public class TCPConnection {
if (_log.shouldLog(Log.WARN))
_log.warn("Message " + cur.getMessageId() + " expired on the queue to "
+ _ident.getHash().toBase64().substring(0,6)
+ " (queue size " + remaining + ") with lifetime "
+ cur.getLifetime());
+ " (queue size " + remaining + "/" + remainingSize + ") with lifetime "
+ cur.getLifetime() + " and size " + cur.getMessageSize());
sent(cur, false, 0);
}
}

View File

@@ -559,7 +559,7 @@ class TunnelPool {
}
if (_log.shouldLog(Log.WARN))
_log.warn("Tunnel " + id + " marked as not ready, since it /failed/", new Exception("Failed tunnel"));
_log.warn("Tunnel " + id + " marked as not ready, since it /failed/: " + info.toString(), new Exception("Failed tunnel"));
_context.messageHistory().tunnelFailed(info.getTunnelId());
info.setIsReady(false);
Hash us = _context.routerHash();