forked from I2P_Developers/i2p.i2p
Transport: Reduce target connections from 60% to 45% of limit.
This will improve network capacity. Apparent problems with lower limits were actually due to unrelated bugs that were fixed by 0.9.8.1-22. This can go lower still; I've been testing 33% without issues.
This commit is contained in:
@ -211,7 +211,7 @@ class EventPumper implements Runnable {
|
||||
int failsafeInvalid = 0;
|
||||
|
||||
// Increase allowed idle time if we are well under allowed connections, otherwise decrease
|
||||
if (_transport.haveCapacity(60))
|
||||
if (_transport.haveCapacity(45))
|
||||
_expireIdleWriteTime = Math.min(_expireIdleWriteTime + 1000, MAX_EXPIRE_IDLE_TIME);
|
||||
else
|
||||
_expireIdleWriteTime = Math.max(_expireIdleWriteTime - 3000, MIN_EXPIRE_IDLE_TIME);
|
||||
|
@ -2848,7 +2848,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
public void timeReached() {
|
||||
// Increase allowed idle time if we are well under allowed connections, otherwise decrease
|
||||
if (haveCapacity(60)) {
|
||||
if (haveCapacity(45)) {
|
||||
long inc;
|
||||
// don't adjust too quickly if we are looping fast
|
||||
if (_lastLoopShort)
|
||||
|
Reference in New Issue
Block a user