aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-16 08:41:20 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-16 08:41:20 -0500
commit10e442ba93be0c41daec10319943aa19c616b281 (patch)
tree91bd3515b0238a8349b350d66a26dd88f7a04f07 /src/or
parenta03469aa851bf6e658d539e95b5f1e786f9622bc (diff)
parent978210d5a868e8b0f5bd5f83804117ae46954f5f (diff)
downloadtor-10e442ba93be0c41daec10319943aa19c616b281.tar.gz
tor-10e442ba93be0c41daec10319943aa19c616b281.zip
Merge remote-tracking branch 'teor/feature17864'
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;
}