commit 9abef516f609a619b25e8f53a413a2e3df05bde8 Merge: 13455c0f1 bf89b0893 Author: Nick Mathewson nickm@torproject.org Date: Tue Dec 12 19:27:14 2017 -0500
Merge branch 'maint-0.3.2'
changes/bug24367 | 13 +++++++++++++ src/or/bridges.c | 38 +++++++------------------------------- src/or/bridges.h | 1 - src/or/circuituse.c | 15 ++++++++++++--- src/or/directory.c | 9 +++++---- src/or/entrynodes.c | 26 ++++++++++++++++++++------ src/or/entrynodes.h | 3 +-- src/or/networkstatus.c | 4 +++- src/test/test_dir.c | 22 ++++++++++++---------- 9 files changed, 73 insertions(+), 58 deletions(-)
diff --cc src/or/networkstatus.c index 61cca1b9b,e0a3e4cdc..deef62bd4 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@@ -1209,16 -1208,10 +1209,18 @@@ should_delay_dir_fetches(const or_optio return 1; }
+ if (we_are_hibernating()) { + if (msg_out) { + *msg_out = "We are hibernating or shutting down."; + } + log_info(LD_DIR, "Delaying dir fetches (Hibernating or shutting down)"); + return 1; + } + if (options->UseBridges) { - if (!any_bridge_descriptors_known()) { + /* If we know that none of our bridges can possibly work, avoid fetching + * directory documents. But if some of them might work, try again. */ + if (num_bridges_usable(1) == 0) { if (msg_out) { *msg_out = "No running bridges"; }