Minor retry tuning to improve behavior under failing conditions.
- Mar 31, 2022
-
-
Nick Mathewson authored
Replace the next delay field immediately rather than taking it and _then_ setting it. This way, it's never in an incorrect state.
-
- Mar 30, 2022
-
-
Nick Mathewson authored
The older default seems (experimentally) to be ridiculously high. Generally, if we can't build a circuit within a handful attempts, that circuit has already timed out... unless there is a fast-failure condition, in which case we're just hammering the network (or our view of it.) Found with `arti-testing` for #329.
-
Nick Mathewson authored
Previously, if we had launch_parallelism > 1, and we were willing to retry building a circuit max_retries times, then we'd launch up to max_retries * launch_parallelism circuits before giving up. Ouch! With this patch, we try to keep the total number of circuits planned and attempted to the actual max_retries limit. Part of #329; found with arti-testing.
-
Nick Mathewson authored
The previous algorithm had two flaws: * It would wait even after the final attempt, when there were no more retries to do. * It would fail to wait between attempts if an error occurred. This refactoring fixes both of these issues, and adds some comments.
-