Don't say "downloading 1 descriptor, 4 at a time"

Fixes bug 19648, bugfix on 0.1.1.8-alpha.
This commit is contained in:
Nick Mathewson 2017-05-23 09:47:11 -04:00
parent af98b862a5
commit 994595ae5d
2 changed files with 8 additions and 2 deletions

5
changes/bug19648 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (logging):
- When logging the number of descriptors we intend to download per
directory request, do not log a number higher than then the
number of descriptors we're fetching in total. Fixes bug 19648;
bugfix on 0.1.1.8-alpha.

View File

@ -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";