diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2017-02-21 21:28:00 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-08 13:49:22 -0400 |
commit | d5a151a06788c28ac1c50398c6e571d484774f47 (patch) | |
tree | d2e4f2719130250e428f1991a01511c89e589a29 /src/or/main.c | |
parent | b0e92634d85a3bf7612a6ce0339b96e4aad1e0bb (diff) | |
download | tor-d5a151a06788c28ac1c50398c6e571d484774f47.tar.gz tor-d5a151a06788c28ac1c50398c6e571d484774f47.zip |
Bug 17592: Clean up connection timeout logic.
This unifies CircuitIdleTimeout and PredictedCircsRelevanceTime into a single
option, and randomizes it.
It also gives us control over the default value as well as relay-to-relay
connection lifespan through the consensus.
Conflicts:
src/or/circuituse.c
src/or/config.c
src/or/main.c
src/test/testing_common.c
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index ef4a1ffdd0..e124441041 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1096,8 +1096,9 @@ run_connection_housekeeping(int i, time_t now) } else if (!have_any_circuits && now - or_conn->idle_timeout >= chan->timestamp_last_had_circuits) { - log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) " - "[no circuits for %d; timeout %d; %scanonical].", + log_info(LD_OR,"Expiring non-used OR connection "U64_FORMAT" to fd %d " + "(%s:%d) [no circuits for %d; timeout %d; %scanonical].", + U64_PRINTF_ARG(chan->global_identifier), (int)conn->s, conn->address, conn->port, (int)(now - chan->timestamp_last_had_circuits), or_conn->idle_timeout, @@ -3019,6 +3020,9 @@ tor_init(int argc, char *argv[]) /* The options are now initialised */ const or_options_t *options = get_options(); + /* Initialize predicted ports list after loading options */ + predicted_ports_init(); + #ifndef _WIN32 if (geteuid()==0) log_warn(LD_GENERAL,"You are running Tor as root. You don't need to, " |