summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-12-04 02:51:11 +0000
committerRoger Dingledine <arma@torproject.org>2004-12-04 02:51:11 +0000
commitc644886c3860d30e37ef8ded7f1a675c543e3c57 (patch)
treea84c5fdae9e8c47fd2d63a45ad39177b6285967e /src/or/circuituse.c
parent675f60aa13ef6fd3934085a16addef6769360e92 (diff)
downloadtor-c644886c3860d30e37ef8ded7f1a675c543e3c57.tar.gz
tor-c644886c3860d30e37ef8ded7f1a675c543e3c57.zip
bugfix: When we were checking to see if an ap_conn should time out
waiting for its connected cell, we were calculating time from when the ap_conn was created. So if it waited say 20 seconds before being attached, then we would immediately decide that the circuit had timed out. Also, make circuit_dump_by_conn() display actual circuit progress, including circuits that haven't been attached to the conn yet but hope to when it finishes connecting. svn:r3072
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index c688be70b2..0c3cf25786 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -758,6 +758,7 @@ circuit_get_open_circ_or_launch(connection_t *conn,
static void link_apconn_to_circ(connection_t *apconn, circuit_t *circ) {
/* add it into the linked list of streams on this circuit */
log_fn(LOG_DEBUG,"attaching new conn to circ. n_circ_id %d.", circ->n_circ_id);
+ apconn->timestamp_lastread = time(NULL); /* reset it, so we can measure circ timeouts */
apconn->next_stream = circ->p_streams;
/* assert_connection_ok(conn, time(NULL)); */
circ->p_streams = apconn;