diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-08 07:12:16 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-08 07:12:16 -0500 |
commit | d1a0f2e7e43553d25e5b9d9ba71ee058897b0ce1 (patch) | |
tree | feeee07346923db6e0a572029374c3b3a2ba2aa6 /src/or | |
parent | a9fb2b4047f64a7709c36d77453883462ff1dca8 (diff) | |
parent | 38e3f91c6388bc676c0007b009488ffcc2496bc8 (diff) | |
download | tor-d1a0f2e7e43553d25e5b9d9ba71ee058897b0ce1.tar.gz tor-d1a0f2e7e43553d25e5b9d9ba71ee058897b0ce1.zip |
Merge branch 'maint-0.2.9'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 6a681ef23b..65ddd7d583 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -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; |