I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 3816278a authored by zzz's avatar zzz
Browse files

Router: Don't set congestion cap at startup because of high job lag

parent 338985a4
No related branches found
No related tags found
No related merge requests found
...@@ -1244,10 +1244,11 @@ public class Router implements RouterClock.ClockShiftListener { ...@@ -1244,10 +1244,11 @@ public class Router implements RouterClock.ClockShiftListener {
} else { } else {
// this is a greatly simplified version of RouterThrottleImpl.acceptTunnelRequest() // this is a greatly simplified version of RouterThrottleImpl.acceptTunnelRequest()
long lag = _context.jobQueue().getMaxLag(); long lag = _context.jobQueue().getMaxLag();
if (lag > 500) { if (lag > 300 && getUptime() > 10*60*1000) {
cong = CAPABILITY_CONGESTION_SEVERE; if (lag > 500)
} else if (lag > 300) { cong = CAPABILITY_CONGESTION_SEVERE;
cong = CAPABILITY_CONGESTION_MODERATE; else
cong = CAPABILITY_CONGESTION_MODERATE;
} else { } else {
double bwLim = getSharePercentage() * 1024 * double bwLim = getSharePercentage() * 1024 *
Math.min(_context.bandwidthLimiter().getInboundKBytesPerSecond(), Math.min(_context.bandwidthLimiter().getInboundKBytesPerSecond(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment