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

Skip to content
Snippets Groups Projects
Commit 2eb154c2 authored by zzz's avatar zzz
Browse files

* Tunnel Tests: Add time for outbound delay, to avoid

      congestion collapse
parent 4ec82bee
No related branches found
No related tags found
No related merge requests found
...@@ -212,7 +212,11 @@ class TestJob extends JobImpl { ...@@ -212,7 +212,11 @@ class TestJob extends JobImpl {
// Minimum is 7.5s (since a 0-hop could be the expl. tunnel, but only >= 1-hop client tunnels are tested) // Minimum is 7.5s (since a 0-hop could be the expl. tunnel, but only >= 1-hop client tunnels are tested)
// Network average for success is about 1.5s. // Network average for success is about 1.5s.
// Another possibility - make configurable via pool options // Another possibility - make configurable via pool options
return 2500 * (_outTunnel.getLength() + _replyTunnel.getLength()); //
// Try to prevent congestion collapse (failing all our tunnels and then clogging our outbound
// with new tunnel build requests) by adding in three times the average outbound delay.
int delay = 3 * (int) getContext().statManager().getRate("transport.sendProcessingTime").getRate(60*1000).getAverageValue();
return delay + (2500 * (_outTunnel.getLength() + _replyTunnel.getLength()));
} }
private void scheduleRetest() { scheduleRetest(false); } private void scheduleRetest() { scheduleRetest(false); }
......
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