diff options
author | Roger Dingledine <arma@torproject.org> | 2006-03-21 21:58:00 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-03-21 21:58:00 +0000 |
commit | a3329036a80a95d9d54b539a360fdf29019b7d17 (patch) | |
tree | 03aadf1a6496638d4b23555c71d4987dab190c2e /src | |
parent | 65b575c03dd07f3682145a958eaf9b0e43509411 (diff) | |
download | tor-a3329036a80a95d9d54b539a360fdf29019b7d17.tar tor-a3329036a80a95d9d54b539a360fdf29019b7d17.tar.gz |
Bugfix: looks like clients since 0.1.1.10-alpha have been
expiring connections whenever 5 minutes pass and they *do*
have circuits on them.
svn:r6213
Diffstat (limited to 'src')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index b005b3213..0e3274bc2 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -675,7 +675,7 @@ run_connection_housekeeping(int i, time_t now) } } - if (conn->is_obsolete && conn->n_circuits == 0) { + if (conn->is_obsolete && !conn->n_circuits) { /* no unmarked circs -- mark it now */ log_info(LD_OR, "Expiring non-used OR connection to fd %d (%s:%d) [Obsolete].", @@ -694,14 +694,14 @@ run_connection_housekeeping(int i, time_t now) conn->s,conn->address, conn->port); connection_mark_for_close(conn); conn->hold_open_until_flushed = 1; - } else if (we_are_hibernating() && conn->n_circuits == 0 && + } else if (we_are_hibernating() && !conn->n_circuits && !buf_datalen(conn->outbuf)) { log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) " "[Hibernating or exiting].", conn->s,conn->address, conn->port); connection_mark_for_close(conn); conn->hold_open_until_flushed = 1; - } else if (!clique_mode(options) && conn->n_circuits && + } else if (!clique_mode(options) && !conn->n_circuits && (!router || !server_mode(options) || !router_is_clique_mode(router))) { log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) " |