2005-02-27 jrandom

* Don't rerequest leaseSets if there are already pending requests
    * Reverted the insufficiently tested caching in the DSA/SHA1 impl, and
      temporary disabled the streaming lib packet caching.
    * Reduced the resend RTT penalty to 10s
This commit is contained in:
jrandom
2005-02-27 22:09:37 +00:00
committed by zzz
parent 7983bb1490
commit 469a0852d7
13 changed files with 219 additions and 322 deletions

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.153 $ $Date: 2005/02/26 14:16:47 $";
public final static String ID = "$Revision: 1.154 $ $Date: 2005/02/26 19:03:42 $";
public final static String VERSION = "0.5.0.1";
public final static long BUILD = 5;
public final static long BUILD = 6;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -348,6 +348,8 @@ public class ClientConnectionRunner {
if (_dead) return;
if ( (_currentLeaseSet != null) && (_currentLeaseSet.equals(set)) )
return; // no change
if (_leaseRequest != null)
return; // already requesting
_context.jobQueue().addJob(new RequestLeaseSetJob(_context, this, set, _context.clock().now() + expirationTime, onCreateJob, onFailedJob));
}

View File

@ -53,11 +53,11 @@ class RequestLeaseSetJob extends JobImpl {
if (oldReq != null) {
if (oldReq.getExpiration() > getContext().clock().now()) {
_log.info("request of a leaseSet is still active, wait a little bit before asking again");
requeue(5*1000);
return;
} else {
_log.error("Old *expired* leaseRequest exists! Why did the old request not get killed? (expiration = " + new Date(oldReq.getExpiration()) + ")", getAddedBy());
if (_log.shouldLog(Log.WARN))
_log.warn("Old *expired* leaseRequest exists! Why did the old request not get killed? (expiration = " + new Date(oldReq.getExpiration()) + ")", getAddedBy());
}
return;
}
LeaseRequestState state = new LeaseRequestState(_onCreate, _onFail, _expiration, _ls);
@ -121,10 +121,6 @@ class RequestLeaseSetJob extends JobImpl {
_runner.disconnectClient("Took too long to request leaseSet");
if (_req.getOnFailed() != null)
RequestLeaseSetJob.this.getContext().jobQueue().addJob(_req.getOnFailed());
// only zero out the request if its the one we know about
if (_req == _runner.getLeaseRequest())
_runner.setLeaseRequest(null);
}
}
public String getName() { return "Check LeaseRequest Status"; }