2005-12-31 jrandom

* Include a simple torrent creator in the I2PSnark web UI
    * Further streaming lib closing improvements
    * Refactored the load test components to run off live tunnels (though,
      still not safe for normal/anonymous load testing)
This commit is contained in:
jrandom
2005-12-31 23:40:20 +00:00
committed by zzz
parent 0f8611e465
commit 76f89ac93c
15 changed files with 502 additions and 135 deletions

View File

@ -768,7 +768,7 @@ public class Connection {
long howLong = _options.getInactivityTimeout();
howLong += _context.random().nextInt(30*1000); // randomize it a bit, so both sides don't do it at once
if (_log.shouldLog(Log.DEBUG))
_log.debug("Resetting the inactivity timer to " + howLong, new Exception("Reset by"));
_log.debug("Resetting the inactivity timer to " + howLong, new Exception(toString()));
// this will get rescheduled, and rescheduled, and rescheduled...
RetransmissionTimer.getInstance().removeEvent(_activityTimer);
RetransmissionTimer.getInstance().addEvent(_activityTimer, howLong);

View File

@ -444,14 +444,20 @@ public class ConnectionPacketHandler {
}
public void timeReached() {
if (_con.getLastSendTime() <= _created) {
if (_con.getResetReceived() || _con.getResetSent() || (_con.getUnackedPacketsReceived() <= 0) )
if (_con.getResetReceived() || _con.getResetSent()) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Ack dup on " + _con + ", but we have been reset");
return;
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("Last sent was a while ago, and we want to ack a dup");
_log.debug("Last sent was a while ago, and we want to ack a dup on " + _con);
// we haven't done anything since receiving the dup, send an
// ack now
_con.ackImmediately();
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Ack dup on " + _con + ", but we have sent (" + (_con.getLastSendTime()-_created) + ")");
}
}
}