mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Limit the number of inflight items to the number of items.
This commit is contained in:
parent
6e1eaa936a
commit
c68b341882
@ -353,6 +353,7 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_n_threads < 1 ||
|
||||
opt_n_items < 1 || opt_n_inflight < 1 || opt_n_lowwater < 0 ||
|
||||
opt_n_cancel > opt_n_inflight || opt_n_inflight > MAX_INFLIGHT ||
|
||||
@ -361,6 +362,10 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (opt_n_inflight > opt_n_items) {
|
||||
opt_n_inflight = opt_n_items;
|
||||
}
|
||||
|
||||
init_logging(1);
|
||||
crypto_global_init(1, NULL, NULL);
|
||||
crypto_seed_rng();
|
||||
|
Loading…
Reference in New Issue
Block a user