2006-06-09 jrandom
* Don't let the pending tunnel request queue grow beyond reason (letting things sit for up to 30s when they fail after 10s seems a bit... off)
This commit is contained in:
@ -1,4 +1,9 @@
|
||||
$Id: history.txt,v 1.482 2006-06-04 20:33:03 complication Exp $
|
||||
$Id: history.txt,v 1.483 2006-06-08 20:02:40 jrandom Exp $
|
||||
|
||||
2006-06-09 jrandom
|
||||
* Don't let the pending tunnel request queue grow beyond reason
|
||||
(letting things sit for up to 30s when they fail after 10s
|
||||
seems a bit... off)
|
||||
|
||||
2006-06-08 jrandom
|
||||
* Be more conservative in the proactive rejections
|
||||
|
@ -227,7 +227,7 @@ class RouterThrottleImpl implements RouterThrottle {
|
||||
else
|
||||
timePerRequest = (int)rs.getLifetimeAverageValue();
|
||||
}
|
||||
float pctFull = (queuedRequests * timePerRequest) / (10*1000f);
|
||||
float pctFull = (queuedRequests * timePerRequest) / (2*1000f);
|
||||
float pReject = pctFull * pctFull; //1 - ((1-pctFull) * (1-pctFull));
|
||||
if ( (pctFull >= 1) || (pReject >= _context.random().nextFloat()) ) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.422 $ $Date: 2006-06-04 20:33:04 $";
|
||||
public final static String ID = "$Revision: 1.423 $ $Date: 2006-06-08 20:02:43 $";
|
||||
public final static String VERSION = "0.6.1.20";
|
||||
public final static long BUILD = 2;
|
||||
public final static long BUILD = 3;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -86,7 +86,7 @@ class BuildHandler {
|
||||
handled.add(_inboundBuildMessages.remove(_inboundBuildMessages.size()-1));
|
||||
} else {
|
||||
// drop any expired messages
|
||||
long dropBefore = System.currentTimeMillis() - (BuildRequestor.REQUEST_TIMEOUT*3);
|
||||
long dropBefore = System.currentTimeMillis() - (BuildRequestor.REQUEST_TIMEOUT/2);
|
||||
do {
|
||||
BuildMessageState state = (BuildMessageState)_inboundBuildMessages.get(0);
|
||||
if (state.recvTime <= dropBefore) {
|
||||
@ -601,7 +601,7 @@ class BuildHandler {
|
||||
for (int i = 0; i < _inboundBuildMessages.size(); i++) {
|
||||
BuildMessageState cur = (BuildMessageState)_inboundBuildMessages.get(i);
|
||||
long age = System.currentTimeMillis() - cur.recvTime;
|
||||
if (age >= BuildRequestor.REQUEST_TIMEOUT*3) {
|
||||
if (age >= BuildRequestor.REQUEST_TIMEOUT/2) {
|
||||
_inboundBuildMessages.remove(i);
|
||||
i--;
|
||||
dropped++;
|
||||
|
Reference in New Issue
Block a user