diff options
author | Roger Dingledine <arma@torproject.org> | 2008-06-20 04:42:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-06-20 04:42:17 +0000 |
commit | 8fa912a8c5934971038e2813a0571a5a00d5fd20 (patch) | |
tree | 9918d8e849ed0fc9599937e0a7d284cf162a77b7 /src/or | |
parent | 94dabd2c23bf86dcd603d53a1e0a678b77097737 (diff) | |
download | tor-8fa912a8c5934971038e2813a0571a5a00d5fd20.tar.gz tor-8fa912a8c5934971038e2813a0571a5a00d5fd20.zip |
If we close our OR connection because there's been a circuit
pending on it for too long, we were telling our bootstrap status
events "REASON=NONE". Now tell them "REASON=TIMEOUT".
svn:r15369
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuituse.c | 4 | ||||
-rw-r--r-- | src/or/connection.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 3ba548e6fb..781aa9800b 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -752,7 +752,9 @@ circuit_build_failed(origin_circuit_t *circ) "(%s:%d). I'm going to try to rotate to a better connection.", n_conn->_base.address, n_conn->_base.port); n_conn->_base.or_is_obsolete = 1; - /* XXX021 consider setting n_conn->socket_error to TIMEOUT */ + if (n_conn->_base.state < OR_CONN_STATE_TLS_HANDSHAKING && + !n_conn->socket_error) + n_conn->socket_error = END_OR_CONN_REASON_TIMEOUT; entry_guard_register_connect_status(n_conn->identity_digest, 0, time(NULL)); } diff --git a/src/or/connection.c b/src/or/connection.c index 690cc02774..002d10a03e 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2288,7 +2288,7 @@ connection_handle_write(connection_t *conn, int force) return 0; } -/** Openssl TLS record size is 16383; this is close. The goal here is to +/** OpenSSL TLS record size is 16383; this is close. The goal here is to * push data out as soon as we know there's enough for a TLS record, so * during periods of high load we won't read entire megabytes from * input before pushing any data out. It also has the feature of not |