aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-16 10:32:31 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-11 11:27:04 -0400
commit6557e612959dd9a1df4e85df4a11153be38db3ca (patch)
tree17013d5b55f517cea467814b943386dfb1915e0a /src/or/connection.c
parent463f6628d316cecdd612b4a78cd5349ab4a824c5 (diff)
downloadtor-6557e612959dd9a1df4e85df4a11153be38db3ca.tar
tor-6557e612959dd9a1df4e85df4a11153be38db3ca.tar.gz
Replace last_added_nonpadding with last_had_circuits
The point of the "idle timeout" for connections is to kill the connection a while after it has no more circuits. But using "last added a non-padding cell" as a proxy for that is wrong, since if the last circuit is closed from the other side of the connection, we will not have sent anything on that connection since well before the last circuit closed. This is part of fixing 6799. When applied to 0.2.5, it is also a fix for 12023.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index b967eacf2..d99a54c15 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -249,8 +249,6 @@ dir_connection_new(int socket_family)
/** Allocate and return a new or_connection_t, initialized as by
* connection_init().
*
- * Set timestamp_last_added_nonpadding to now.
- *
* Assign a pseudorandom next_circ_id between 0 and 2**15.
*
* Initialize active_circuit_pqueue.
@@ -264,8 +262,6 @@ or_connection_new(int socket_family)
time_t now = time(NULL);
connection_init(now, TO_CONN(or_conn), CONN_TYPE_OR, socket_family);
- or_conn->timestamp_last_added_nonpadding = time(NULL);
-
connection_or_set_canonical(or_conn, 0);
return or_conn;