diff options
author | Roger Dingledine <arma@torproject.org> | 2003-12-12 23:03:25 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-12-12 23:03:25 +0000 |
commit | 9c66e2bf9a9ced671a18c967d08f8a2320105bbe (patch) | |
tree | c25141330384689d1f285d0f147d9ad70e6bac25 /src/or/onion.c | |
parent | d23c66b04124432561771c95cebc8dd324d035c5 (diff) | |
download | tor-9c66e2bf9a9ced671a18c967d08f8a2320105bbe.tar tor-9c66e2bf9a9ced671a18c967d08f8a2320105bbe.tar.gz |
if >=2 circs are being built that handle a given stream,
no need to have new circs handle it too.
svn:r896
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index ca4f678f8..40b36685d 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -233,7 +233,8 @@ static routerinfo_t *choose_good_exit_server(routerlist_t *dir) for (i = 0; i < n_connections; ++i) { if (carray[i]->type == CONN_TYPE_AP && carray[i]->state == AP_CONN_STATE_CIRCUIT_WAIT && - !carray[i]->marked_for_close) + !carray[i]->marked_for_close && + !circuit_stream_is_being_handled(carray[i])) ++n_pending_connections; } log_fn(LOG_DEBUG, "Choosing exit node; %d connections are pending", @@ -265,7 +266,8 @@ static routerinfo_t *choose_good_exit_server(routerlist_t *dir) for (j = 0; j < n_connections; ++j) { /* iterate over connections */ if (carray[j]->type != CONN_TYPE_AP || carray[j]->state != AP_CONN_STATE_CIRCUIT_WAIT || - carray[j]->marked_for_close) + carray[j]->marked_for_close || + circuit_stream_is_being_handled(carray[j])) continue; /* Skip everything but APs in CIRCUIT_WAIT */ switch (connection_ap_can_use_exit(carray[j], dir->routers[i])) { |