aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-17 21:07:15 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-17 21:07:15 +0000
commit39efb0ed523aa956cca56f616d08391bcfdad14a (patch)
tree8e0675a9863e0ef6e6f59fdeaa266e45804416d6 /src/or/connection_edge.c
parent72568d26205225a4ce9386ae56b9fb39631dc3cf (diff)
downloadtor-39efb0ed523aa956cca56f616d08391bcfdad14a.tar
tor-39efb0ed523aa956cca56f616d08391bcfdad14a.tar.gz
retry streams where the connected cell hasn't arrived in 15 seconds
svn:r1100
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 706a124bc..e7fe3aff7 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -538,11 +538,13 @@ void connection_ap_expire_beginning(void) {
if (conn->type != CONN_TYPE_AP ||
conn->state != AP_CONN_STATE_CONNECTING)
continue;
- if (now - conn->timestamp_lastread > 30) {
- log_fn(LOG_WARN,"Stream is %d seconds late. Closing.",
+ if (now - conn->timestamp_lastread >= 15) {
+ log_fn(LOG_WARN,"Stream is %d seconds late. Retrying.",
(int)(now - conn->timestamp_lastread));
- /* XXX here is where it should move back into 'pending' state */
- conn->marked_for_close = 1;
+ /* move it back into 'pending' state. It's possible it will
+ * reattach to this same circuit, but that's good enough for now.
+ */
+ conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
}
}
}