summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-29 09:15:29 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-29 09:15:29 +0000
commit8e5c1921fcc8252e32f52633dc766dd63fbb6240 (patch)
treeee742b8bbefda433623eeae76b7db92b4403c1c6
parentef5f917e9eefcfd2e3855350120117384af0ce74 (diff)
downloadtor-8e5c1921fcc8252e32f52633dc766dd63fbb6240.tar.gz
tor-8e5c1921fcc8252e32f52633dc766dd63fbb6240.zip
when a stream is 15s late, print out the circuit at -l warn
svn:r1180
-rw-r--r--src/or/connection_edge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 9c245044f8..68493b3c1c 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -529,6 +529,7 @@ repeat_connection_edge_package_raw_inbuf:
void connection_ap_expire_beginning(void) {
connection_t **carray;
connection_t *conn;
+ circuit_t *circ;
int n, i;
time_t now = time(NULL);
@@ -542,6 +543,8 @@ void connection_ap_expire_beginning(void) {
if (now - conn->timestamp_lastread >= 15) {
log_fn(LOG_WARN,"Stream is %d seconds late. Retrying.",
(int)(now - conn->timestamp_lastread));
+ circ = circuit_get_by_conn(conn);
+ circuit_log_path(LOG_WARN, circ);
/* send an end down the circuit */
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
/* un-mark it as ending, since we're going to reuse it */
@@ -550,7 +553,7 @@ void connection_ap_expire_beginning(void) {
* reattach to this same circuit, but that's good enough for now.
*/
conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
- circuit_detach_stream(circuit_get_by_conn(conn), conn);
+ circuit_detach_stream(circ, conn);
/* give it another 15 seconds to try */
conn->timestamp_lastread += 15;
if(connection_ap_handshake_attach_circuit(conn)<0) {