summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-08-22 03:04:09 +0000
committerRoger Dingledine <arma@torproject.org>2007-08-22 03:04:09 +0000
commita5b347e9f42caf77989e0fb7f76262ce080069e0 (patch)
tree8e8363f6bbd9dd0245d201a6b182ee969d6b6f9f /src
parent2fb3f9beba003f9fb8c7c8fdb3d414d901add8ce (diff)
downloadtor-a5b347e9f42caf77989e0fb7f76262ce080069e0.tar.gz
tor-a5b347e9f42caf77989e0fb7f76262ce080069e0.zip
backport r11247
svn:r11248
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ac0db6e5d8..31e835b31f 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1253,7 +1253,7 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
* at least one predicted exit port. */
int try;
- smartlist_t *needed_ports = circuit_get_unhandled_ports(time(NULL));
+ smartlist_t *needed_ports;
if (best_support == -1) {
if (need_uptime || need_capacity) {
@@ -1271,6 +1271,7 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime,
log_notice(LD_CIRC, "All routers are down or won't exit -- choosing a "
"doomed exit at random.");
}
+ needed_ports = circuit_get_unhandled_ports(time(NULL));
for (try = 0; try < 2; try++) {
/* try once to pick only from routers that satisfy a needed port,
* then if there are none, pick from any that support exiting. */