From c644886c3860d30e37ef8ded7f1a675c543e3c57 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 4 Dec 2004 02:51:11 +0000 Subject: 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 --- src/or/connection_edge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/connection_edge.c') diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 7bec6272d8..5676a1af86 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -274,8 +274,8 @@ void connection_ap_expire_beginning(void) { } tor_assert(circ->purpose == CIRCUIT_PURPOSE_C_GENERAL); if (conn->num_retries >= MAX_STREAM_RETRIES) { - log_fn(LOG_WARN,"Stream is %d seconds late. Giving up.", - 15*conn->num_retries); /* XXX this number is not accurate */ + log_fn(LOG_WARN,"Stream is %d seconds old. Giving up.", + (int)(now - conn->timestamp_created)); circuit_log_path(LOG_WARN, circ); connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer); connection_mark_for_close(conn); -- cgit v1.2.3-54-g00ecf