diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-27 11:23:56 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-27 11:23:56 +0000 |
commit | 505bb2f4a01804c91603bde7544fb56a24deac15 (patch) | |
tree | 4cfd3179607a861e9edbf60e93c7cb1ef2f71e3e | |
parent | 8e8af6aaee4c760e051f114df2295a9cd67364cd (diff) | |
download | tor-505bb2f4a01804c91603bde7544fb56a24deac15.tar tor-505bb2f4a01804c91603bde7544fb56a24deac15.tar.gz |
it was the second bug that was nailing us.
periodically we expire some circuits if we already have
enough, and we were counting rend circs in that number.
(the first one wasn't a bug after all)
svn:r1729
-rw-r--r-- | src/or/circuit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index 37c9fa4ab..a1ca45eee 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -1232,10 +1232,9 @@ void circuit_expire_old_circuits(void) { if (circ->timestamp_dirty && circ->timestamp_dirty + options.NewCircuitPeriod < now && !circ->p_conn && /* we're the origin */ - !circ->p_streams && /* AP connections */ - !circ->n_streams /* exit connections */ ) { - log_fn(LOG_DEBUG,"Closing n_circ_id %d (dirty %d secs ago)",circ->n_circ_id, - (int)(now - circ->timestamp_dirty)); + !circ->p_streams /* nothing attached */ ) { + log_fn(LOG_DEBUG,"Closing n_circ_id %d (dirty %d secs ago, purp %d)",circ->n_circ_id, + (int)(now - circ->timestamp_dirty), circ->purpose); circuit_mark_for_close(circ); } else if (!circ->timestamp_dirty && CIRCUIT_IS_ORIGIN(circ) && circ->state == CIRCUIT_STATE_OPEN && @@ -1250,6 +1249,8 @@ void circuit_expire_old_circuits(void) { } for (i = MAX_UNUSED_OPEN_CIRCUITS; i < smartlist_len(unused_open_circs); ++i) { circuit_t *circ = smartlist_get(unused_open_circs, i); + log_fn(LOG_DEBUG,"Expiring excess clean circ (n_circ_id %d, purp %d)", + circ->n_circ_id, circ->purpose); circuit_mark_for_close(circ); } smartlist_free(unused_open_circs); |