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/channel.h | |
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/channel.h')
-rw-r--r-- | src/or/channel.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/channel.h b/src/or/channel.h index 2dca81705f..be40a30ccb 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -187,8 +187,10 @@ struct channel_s { time_t timestamp_recv; /* Cell received from lower layer */ time_t timestamp_xmit; /* Cell sent to lower layer */ - /* Timestamp for relay.c */ - time_t timestamp_last_added_nonpadding; + /** Timestamp for run_connection_housekeeping(). We update this once a + * second when we run housekeeping and find a circuit on this channel, and + * whenever we add a circuit to the channel. */ + time_t timestamp_last_had_circuits; /** Unique ID for measuring direct network status requests;vtunneled ones * come over a circuit_t, which has a dirreq_id field as well, but is a |