summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-12-14 20:20:52 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2015-12-16 09:07:11 +1100
commit978210d5a868e8b0f5bd5f83804117ae46954f5f (patch)
tree3844c9f8bcf6f952065cc591e6e2252c2618f5b4 /src/or
parent6ba8afe5f87a1edd16f4c61cbb59a29f9126c6c6 (diff)
downloadtor-978210d5a868e8b0f5bd5f83804117ae46954f5f.tar.gz
tor-978210d5a868e8b0f5bd5f83804117ae46954f5f.zip
Wait for busy authorities/fallbacks rather than ignoring excluded nodes
Applies the 6c443e987d fix to router_pick_directory_server_impl. 6c443e987d applied to directory servers chosen from the consensus, and was: "Tweak the 9969 fix a little If we have busy nodes and excluded nodes, then don't retry with the excluded ones enabled. Instead, wait for the busy ones to be nonbusy."
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 051bac5de5..c45854c52f 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1739,22 +1739,24 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist,
result = &selection->fake_status;
}
- if (n_busy_out)
- *n_busy_out = n_busy;
-
smartlist_free(direct);
smartlist_free(tunnel);
smartlist_free(overloaded_direct);
smartlist_free(overloaded_tunnel);
- if (result == NULL && try_excluding && !options->StrictNodes && n_excluded) {
+ if (result == NULL && try_excluding && !options->StrictNodes && n_excluded
+ && !n_busy) {
/* If we got no result, and we are excluding nodes, and StrictNodes is
* not set, try again without excluding nodes. */
try_excluding = 0;
n_excluded = 0;
+ n_busy = 0;
goto retry_without_exclude;
}
+ if (n_busy_out)
+ *n_busy_out = n_busy;
+
return result;
}