diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-17 13:14:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-17 13:14:40 +0000 |
commit | fea3382aca569cd93cc0a43b45e558e58cee6b8e (patch) | |
tree | ad30ee391f5a597f0f033bf03fd41bf6d6ce5695 /src/or | |
parent | a750683d2f3d35716a072dd7b0ba6c1d79a2119a (diff) | |
download | tor-fea3382aca569cd93cc0a43b45e558e58cee6b8e.tar.gz tor-fea3382aca569cd93cc0a43b45e558e58cee6b8e.zip |
Backport r17091: when we have no pending streams, choose exits with choose_good_exit_server_general rather than with circuit_get_unhandled_ports().
svn:r17637
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 606eab908f..473b67875a 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1255,6 +1255,11 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime, // router->nickname, i); } }); /* End looping over connections. */ + if (n_pending_connections > 0 && n_supported[i] == 0) { + /* Leave best_support at -1 if that's where it is, so we can + * distinguish it later. */ + continue; + } if (n_supported[i] > best_support) { /* If this router is better than previous ones, remember its index * and goodness, and start counting how many routers are this good. */ |