summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.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/connection_edge.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/connection_edge.c')
-rw-r--r--src/or/connection_edge.c4
1 files changed, 2 insertions, 2 deletions
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);