summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-10 14:28:47 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-10 14:28:47 +0000
commita43db78e8de38a81838a1db0680105d6f73d41d4 (patch)
tree032b51f651e0424156057158302d8d5ca471d750
parentc9af37d1ba3a3ca7dd844ca85ae220189ee09470 (diff)
downloadtor-a43db78e8de38a81838a1db0680105d6f73d41d4.tar.gz
tor-a43db78e8de38a81838a1db0680105d6f73d41d4.zip
Resolve FIXME items: make the kill-unattached-AP timeout symbolic
svn:r2793
-rw-r--r--src/or/circuituse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 0b5ccc9d9b..de20f7fcdd 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -11,6 +11,9 @@
#include "or.h"
+/** Longest time to wait for a circuit before closing an AP connection */
+#define CONN_AP_MAX_ATTACH_DELAY 60
+
/********* START VARIABLES **********/
extern circuit_t *global_circuitlist; /* from circuitlist.c */
@@ -764,8 +767,7 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
tor_assert(conn->socks_request);
conn_age = time(NULL) - conn->timestamp_created;
- if(conn_age > 60) {
- /* XXX make this cleaner than '60' */
+ if(conn_age > CONN_AP_MAX_ATTACH_DELAY) {
log_fn(LOG_WARN,"Giving up on unattached conn (%d sec old).", conn_age);
return -1;
}