aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-23 09:47:11 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-23 09:47:11 -0400
commit994595ae5d0bc5e72bdeb9a2e7889b9f52b8b3c8 (patch)
tree421ffc56b68d1159f94ddd54a6a6da58b0979f34 /src/or/routerlist.c
parentaf98b862a51c001efae1eae4f467e0c9b835953e (diff)
downloadtor-994595ae5d0bc5e72bdeb9a2e7889b9f52b8b3c8.tar.gz
tor-994595ae5d0bc5e72bdeb9a2e7889b9f52b8b3c8.zip
Don't say "downloading 1 descriptor, 4 at a time"
Fixes bug 19648, bugfix on 0.1.1.8-alpha.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index a790265afb..b7ed87aba6 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -5054,8 +5054,9 @@ launch_descriptor_downloads(int purpose,
if (n_per_request > max_dl_per_req)
n_per_request = max_dl_per_req;
- if (n_per_request < MIN_DL_PER_REQUEST)
- n_per_request = MIN_DL_PER_REQUEST;
+ if (n_per_request < MIN_DL_PER_REQUEST) {
+ n_per_request = MIN(MIN_DL_PER_REQUEST, n_downloadable);
+ }
if (n_downloadable > n_per_request)
req_plural = rtr_plural = "s";