diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-05-16 10:32:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-06-11 11:27:04 -0400 |
commit | 6557e612959dd9a1df4e85df4a11153be38db3ca (patch) | |
tree | 17013d5b55f517cea467814b943386dfb1915e0a /src/or/connection_or.c | |
parent | 463f6628d316cecdd612b4a78cd5349ab4a824c5 (diff) | |
download | tor-6557e612959dd9a1df4e85df4a11153be38db3ca.tar.gz tor-6557e612959dd9a1df4e85df4a11153be38db3ca.zip |
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_or.c')
-rw-r--r-- | src/or/connection_or.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index f03b18ddf1..3d239d4800 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1929,9 +1929,6 @@ connection_or_write_cell_to_buf(const cell_t *cell, or_connection_t *conn) if (conn->base_.state == OR_CONN_STATE_OR_HANDSHAKING_V3) or_handshake_state_record_cell(conn, conn->handshake_state, cell, 0); - - if (cell->command != CELL_PADDING) - conn->timestamp_last_added_nonpadding = approx_time(); } /** Pack a variable-length <b>cell</b> into wire-format, and write it onto @@ -1952,8 +1949,6 @@ connection_or_write_var_cell_to_buf(const var_cell_t *cell, cell->payload_len, TO_CONN(conn)); if (conn->base_.state == OR_CONN_STATE_OR_HANDSHAKING_V3) or_handshake_state_record_var_cell(conn, conn->handshake_state, cell, 0); - if (cell->command != CELL_PADDING) - conn->timestamp_last_added_nonpadding = approx_time(); /* Touch the channel's active timestamp if there is one */ if (conn->chan) |