summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-18 09:27:05 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-18 09:27:05 +0000
commitc4b72a254fa3d733615384cab73692033441cf3b (patch)
tree436a3b675b14c02491062c77735a4a788280315e
parente9ebefc8bff3c472b22dd336aa41f8c59064087c (diff)
downloadtor-c4b72a254fa3d733615384cab73692033441cf3b.tar.gz
tor-c4b72a254fa3d733615384cab73692033441cf3b.zip
tmp patch to also expire old clean rend_ready circs for now
will have to be fixed once we build-and-open rend circs preemptively svn:r1668
-rw-r--r--src/or/circuit.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index eafead450d..bf410c8a1b 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -449,10 +449,10 @@ circuit_t *circuit_get_rendezvous(const char *cookie)
return NULL;
}
-#define MIN_SECONDS_BEFORE_EXPIRING_CIRC 20
+#define MIN_SECONDS_BEFORE_EXPIRING_CIRC 30
/* circuits that were born at the end of their second might be expired
- * after 10.1 seconds; circuits born at the beginning might be expired
- * after closer to 11 seconds.
+ * after 30.1 seconds; circuits born at the beginning might be expired
+ * after closer to 31 seconds.
*/
/* close all circuits that start at us, aren't open, and were born
@@ -493,6 +493,10 @@ void circuit_expire_building(time_t now) {
victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCING ||
victim->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
+ /* it's a rend_ready circ, but it's already picked a query */
+ (victim->purpose == CIRCUIT_PURPOSE_C_REND_READY &&
+ victim->rend_query[0]) ||
+
/* c_rend_ready circs measure age since timestamp_dirty,
* because that's set when they switch purposes
*/