diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-10-14 17:05:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-10-14 17:05:52 +0000 |
commit | 846e40d1935eefaa9386e343302128a9db733ebf (patch) | |
tree | d4a75c45d18f3032a73ee617e1039eb00c255852 /src/or/circuitbuild.c | |
parent | 3e0f0b48d923332d8444c80f89848f6afde761da (diff) | |
download | tor-846e40d1935eefaa9386e343302128a9db733ebf.tar.gz tor-846e40d1935eefaa9386e343302128a9db733ebf.zip |
Patch from rovv: when we have no pending streams, choose exits with choose_good_exit_server_general() rather than with circuit_get_unhandled_ports() and friends. Bugfix on 0.1.1.x, at least.
svn:r17091
Diffstat (limited to 'src/or/circuitbuild.c')
-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 9470f86986..02414c69ad 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1265,6 +1265,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. */ |