forked from I2P_Developers/i2p.i2p
2004-12-14 jrandom
* Reenable the probabalistic drop on the TCP queues to deal with good old fashioned bandwidth limiting. However, by default the probability is rigged to reserve 0% of the queue free - meaning we just aggressively fail messages in the queue if we're transferring too slowly. That reservation factor can be increased with 'tcp.queueFreeFactor=0.25' (or whatever) and the drop code can be disabled with the parameter 'tcp.dropProbabalistically=false'. * Still penalize a peer on tunnel failure, but don't immediately drop their capacity to 0. * More aggressively ACK duplicates * Randomize the timestamper period * Display the clock skew on the connection logs when a peer sends it. * Allow the timestamper to fix skews of up to 10 minutes * Logging
This commit is contained in:
@ -124,7 +124,8 @@ public class Timestamper implements Runnable {
|
||||
alreadyBitched = true;
|
||||
}
|
||||
}
|
||||
try { Thread.sleep(_queryFrequency); } catch (InterruptedException ie) {}
|
||||
long sleepTime = _context.random().nextInt(_queryFrequency) + _queryFrequency;
|
||||
try { Thread.sleep(sleepTime); } catch (InterruptedException ie) {}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
_log.log(Log.CRIT, "Timestamper died!", t);
|
||||
|
@ -42,8 +42,8 @@ public class Clock implements Timestamper.UpdateListener {
|
||||
|
||||
/** if the clock is skewed by 3+ days, fuck 'em */
|
||||
public final static long MAX_OFFSET = 3 * 24 * 60 * 60 * 1000;
|
||||
/** after we've started up and shifted the clock, don't allow shifts of more than a minute */
|
||||
public final static long MAX_LIVE_OFFSET = 60 * 1000;
|
||||
/** after we've started up and shifted the clock, don't allow shifts of more than 10 minutes */
|
||||
public final static long MAX_LIVE_OFFSET = 10 * 60 * 1000;
|
||||
/** if the clock skewed changes by less than 1s, ignore the update (so we don't slide all over the place) */
|
||||
public final static long MIN_OFFSET_CHANGE = 10 * 1000;
|
||||
|
||||
|
Reference in New Issue
Block a user