summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-10-01 06:41:13 +0000
committerRoger Dingledine <arma@torproject.org>2006-10-01 06:41:13 +0000
commit4096e577c51a6eae88ab26cb4931998b0486e678 (patch)
treefa01f2a89a28aab3ef1828604e33b012a04d6db7 /src/or/circuituse.c
parent96a4cb1dfa4d65c6c57261f038aa5bdf6e776ac2 (diff)
downloadtor-4096e577c51a6eae88ab26cb4931998b0486e678.tar.gz
tor-4096e577c51a6eae88ab26cb4931998b0486e678.zip
if we fail to build a circuit to an intended enclave, and it's
not mandatory that we use that enclave, stop wanting it. svn:r8559
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 06e0936903..4ccd4c1be1 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -748,6 +748,11 @@ circuit_build_failed(origin_circuit_t *circ)
case CIRCUIT_PURPOSE_C_GENERAL:
/* If we never built the circuit, note it as a failure. */
circuit_increment_failure_count();
+ if (failed_at_last_hop) {
+ /* Make sure any streams that demand our last hop as their exit
+ * know that it's unlikely to happen. */
+ circuit_discard_optional_exit_enclaves(circ->cpath->prev->extend_info);
+ }
break;
case CIRCUIT_PURPOSE_TESTING:
circuit_testing_failed(circ, failed_at_last_hop);