aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-10-03 15:06:07 -0400
committerNick Mathewson <nickm@torproject.org>2011-10-03 15:06:07 -0400
commit4aa4bce474e6fb3e52c0aecb48f3e5024576e693 (patch)
treee50f755df4f2f7ee1fed7d11f0671abf46899e06 /src/or/connection_edge.c
parenta7f93b509c9c24a4af6abdd946007bdf2d497d87 (diff)
parentc5226bfe1c26d2cbcc789c1074d8d925e7c7fea1 (diff)
downloadtor-4aa4bce474e6fb3e52c0aecb48f3e5024576e693.tar.gz
tor-4aa4bce474e6fb3e52c0aecb48f3e5024576e693.zip
Merge remote-tracking branch 'rransom-tor/bug3335-v2'
Conflicts: src/or/connection_edge.c src/or/rendclient.c
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index f59f44c9ad..3393104686 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -71,6 +71,18 @@ _connection_mark_unattached_ap(entry_connection_t *conn, int endreason,
tor_assert(base_conn->type == CONN_TYPE_AP);
ENTRY_TO_EDGE_CONN(conn)->edge_has_sent_end = 1; /* no circ yet */
+ /* If this is a rendezvous stream and it is failing without ever
+ * being attached to a circuit, assume that an attempt to connect to
+ * the destination hidden service has just ended.
+ *
+ * XXX023 This condition doesn't limit to only streams failing
+ * without ever being attached. That sloppiness should be harmless,
+ * but we should fix it someday anyway. */
+ if ((conn->on_circuit != NULL || conn->edge_has_sent_end) &&
+ connection_edge_is_rendezvous_stream(conn)) {
+ rend_client_note_connection_attempt_ended(conn->rend_data->onion_address);
+ }
+
if (base_conn->marked_for_close) {
/* This call will warn as appropriate. */
_connection_mark_for_close(base_conn, line, file);