when building preemptive circuits, ignore streams that have a

chosen exit node in mind already. otherwise we get tricked into
trying to build a new circuit that will handle them.


svn:r17184
This commit is contained in:
Roger Dingledine 2008-11-03 07:00:56 +00:00
parent 3e5a584d37
commit ebe4ef12b9

View File

@ -1168,7 +1168,8 @@ ap_stream_wants_exit_attention(connection_t *conn)
conn->state == AP_CONN_STATE_CIRCUIT_WAIT && conn->state == AP_CONN_STATE_CIRCUIT_WAIT &&
!conn->marked_for_close && !conn->marked_for_close &&
!(TO_EDGE_CONN(conn)->want_onehop) && /* ignore one-hop streams */ !(TO_EDGE_CONN(conn)->want_onehop) && /* ignore one-hop streams */
!(TO_EDGE_CONN(conn)->use_begindir) && /* ignore targetted dir fetches */ !(TO_EDGE_CONN(conn)->use_begindir) && /* ignore targeted dir fetches */
!(TO_EDGE_CONN(conn)->chosen_exit_name) && /* ignore defined streams */
!connection_edge_is_rendezvous_stream(TO_EDGE_CONN(conn)) && !connection_edge_is_rendezvous_stream(TO_EDGE_CONN(conn)) &&
!circuit_stream_is_being_handled(TO_EDGE_CONN(conn), 0, !circuit_stream_is_being_handled(TO_EDGE_CONN(conn), 0,
MIN_CIRCUITS_HANDLING_STREAM)) MIN_CIRCUITS_HANDLING_STREAM))