From: Roger Dingledine Date: Fri, 18 Apr 2003 18:47:49 +0000 (+0000) Subject: bugfix: only close old circuits if they have no connections! X-Git-Tag: tor-0.0.2pre8~217 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10902028e0359781fcb4e6d44889c8a819768ab4;p=thirdparty%2Ftor.git bugfix: only close old circuits if they have no connections! svn:r251 --- diff --git a/src/or/circuit.c b/src/or/circuit.c index 9b11d55803..6b68df275a 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -630,7 +630,7 @@ void circuit_expire_unused_circuits(void) { while(circ) { tmpcirc = circ; circ = circ->next; - if(tmpcirc != youngest && (!tmpcirc->p_conn || tmpcirc->p_conn->type == CONN_TYPE_AP)) { + if(tmpcirc != youngest && !tmpcirc->p_conn) { log(LOG_DEBUG,"circuit_expire_unused_circuits(): Closing n_aci %d",tmpcirc->n_aci); circuit_close(tmpcirc); } diff --git a/src/or/main.c b/src/or/main.c index e0341061eb..7dbb0f2e39 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -327,7 +327,7 @@ int prepare_for_poll(int *timeout) { circuit_launch_new(-1); /* tell it to forget about previous failures */ circ = circuit_get_newest_by_edge_type(EDGE_AP); if(!circ || circ->dirty) { - log(LOG_INFO,"prepare_for_poll(): Youngest circuit missing or dirty; launching replacement."); + log(LOG_INFO,"prepare_for_poll(): Youngest circuit %s; launching replacement.", circ ? "dirty" : "missing"); circuit_launch_new(0); /* make an onion and lay the circuit */ } time_to_new_circuit = now.tv_sec + options.NewCircuitPeriod;