mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'maint-0.2.9'
This commit is contained in:
commit
d1a0f2e7e4
5
changes/bug20597
Normal file
5
changes/bug20597
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (test networks, exponential backoff):
|
||||
- When using exponential backoff in test networks, use a lower exponent,
|
||||
so the delays do not vary as much. This helps test networks bootstrap
|
||||
consistently. Fixes bug 20597; bugfix on 20499; not in any released
|
||||
version of tor.
|
@ -3997,7 +3997,12 @@ next_random_exponential_delay(int delay, int max_delay)
|
||||
|
||||
/* How much are we willing to add to the delay? */
|
||||
int max_increment;
|
||||
const int multiplier = 3; /* no more than quadruple the previous delay */
|
||||
int multiplier = 3; /* no more than quadruple the previous delay */
|
||||
if (get_options()->TestingTorNetwork) {
|
||||
/* Decrease the multiplier in testing networks. This reduces the variance,
|
||||
* so that bootstrap is more reliable. */
|
||||
multiplier = 2; /* no more than triple the previous delay */
|
||||
}
|
||||
|
||||
if (delay && delay < (INT_MAX-1) / multiplier) {
|
||||
max_increment = delay * multiplier;
|
||||
|
Loading…
Reference in New Issue
Block a user