]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When looking for conns to close, count the age of linked queued data
authorNick Mathewson <nickm@torproject.org>
Tue, 19 Aug 2014 15:27:52 +0000 (11:27 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 24 Aug 2014 17:04:45 +0000 (13:04 -0400)
Specifically, count the age of the data queued in a linked directory
connection's buffers when counting a stream's age.

src/or/circuitlist.c

index bcdd858be051a91bfd853f482a63cd0edd4bdef8..68534208c6da84f2898b0cf3e1b0005391e18e8c 100644 (file)
@@ -1925,6 +1925,11 @@ circuit_get_streams_max_data_age(const edge_connection_t *stream, uint32_t now)
     age2 = conn_get_buffer_age(conn, now);
     if (age2 > age)
       age = age2;
+    if (conn->linked_conn) {
+      age2 = conn_get_buffer_age(conn->linked_conn, now);
+      if (age2 > age)
+        age = age2;
+    }
   }
   return age;
 }