aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-22 08:58:17 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-22 08:58:17 -0400
commit91467e04b18afce9af2189116ad0e160fef53e49 (patch)
tree4ddc095a95cecec1b431899841b73e2b5a388bf7 /src/or/circuituse.c
parent512c57cff97c0533bbb56e6c41a1e3dca5fd9064 (diff)
parent95a7e7e9254bc70db9e1d967d0db3deb658a2be3 (diff)
downloadtor-91467e04b18afce9af2189116ad0e160fef53e49.tar.gz
tor-91467e04b18afce9af2189116ad0e160fef53e49.zip
Merge branch 'bug22805_v2_squashed'
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index e6f1e4df88..343ce3bcf5 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1514,7 +1514,7 @@ circuit_expire_old_circuits_clientside(void)
#define IDLE_ONE_HOP_CIRC_TIMEOUT 60
/** Find each non-origin circuit that has been unused for too long,
- * has no streams on it, used a create_fast, and ends here: mark it
+ * has no streams on it, came from a client, and ends here: mark it
* for close.
*/
void
@@ -1530,9 +1530,9 @@ circuit_expire_old_circuits_serverside(time_t now)
/* If the circuit has been idle for too long, and there are no streams
* on it, and it ends here, and it used a create_fast, mark it for close.
*/
- if (or_circ->is_first_hop && !circ->n_chan &&
+ if (or_circ->p_chan && channel_is_client(or_circ->p_chan) &&
+ !circ->n_chan &&
!or_circ->n_streams && !or_circ->resolving_streams &&
- or_circ->p_chan &&
channel_when_last_xmit(or_circ->p_chan) <= cutoff) {
log_info(LD_CIRC, "Closing circ_id %u (empty %d secs ago)",
(unsigned)or_circ->p_circ_id,