diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-09-17 03:23:26 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2011-10-02 12:49:35 -0700 |
commit | 34a6b8b7e588b6f10e6e87cf876ef6ada49f8b8a (patch) | |
tree | 200537b33bfeb739bc15e34f565405ae7bfc1655 /src/or/connection_edge.c | |
parent | eaed37d14c6e1dc93a392f62ef2e501f75e4878a (diff) | |
download | tor-34a6b8b7e588b6f10e6e87cf876ef6ada49f8b8a.tar.gz tor-34a6b8b7e588b6f10e6e87cf876ef6ada49f8b8a.zip |
Clear the timed_out flag when an HS connection attempt ends
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 8609b023d5..0c5ebdee64 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -68,6 +68,18 @@ _connection_mark_unattached_ap(edge_connection_t *conn, int endreason, tor_assert(conn->_base.type == CONN_TYPE_AP); 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 (conn->_base.marked_for_close) { /* This call will warn as appropriate. */ _connection_mark_for_close(TO_CONN(conn), line, file); |