diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-11-17 08:49:30 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-11-17 09:04:25 -0500 |
commit | 84b3350c83a995a7668c16cb06ae069664dc0633 (patch) | |
tree | db6fd22961f3b1a6239593b58cd5cb4ea7f1ee3e /src/or/circuituse.c | |
parent | b1d56fc5890fb6d594e70520c09d040e9b2e1544 (diff) | |
download | tor-84b3350c83a995a7668c16cb06ae069664dc0633.tar.gz tor-84b3350c83a995a7668c16cb06ae069664dc0633.zip |
Be more conservative in scanning the list of pending streams
Now we only re-scan the list in the cases we did before: when we
have a new circuit that we should try attaching to, or when we have
added a new stream that we haven't tried to attach yet.
This is part of 17590.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 3a1d154178..5b24425877 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1475,7 +1475,7 @@ circuit_has_opened(origin_circuit_t *circ) case CIRCUIT_PURPOSE_C_ESTABLISH_REND: rend_client_rendcirc_has_opened(circ); /* Start building an intro circ if we don't have one yet. */ - connection_ap_attach_pending(); + connection_ap_attach_pending(1); /* This isn't a call to circuit_try_attaching_streams because a * circuit in _C_ESTABLISH_REND state isn't connected to its * hidden service yet, thus we can't attach streams to it yet, @@ -1537,14 +1537,14 @@ void circuit_try_attaching_streams(origin_circuit_t *circ) { /* Attach streams to this circuit if we can. */ - connection_ap_attach_pending(); + connection_ap_attach_pending(1); /* The call to circuit_try_clearing_isolation_state here will do * nothing and return 0 if we didn't attach any streams to circ * above. */ if (circuit_try_clearing_isolation_state(circ)) { /* Maybe *now* we can attach some streams to this circuit. */ - connection_ap_attach_pending(); + connection_ap_attach_pending(1); } } |