[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.2.9] Always call connection_ap_attach_pending() once a second.



commit b2f82d45b7e0166a8de3a7b6d38e288dd1e6d96e
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Oct 31 14:42:26 2016 -0400

    Always call connection_ap_attach_pending() once a second.
    
    Fixes bug 19969; bugfix on b1d56fc58.  We can fix this some more in
    later Tors, but for now, this is probably the simplest fix possible.
    
    This is a belt-and-suspenders fix, where the earlier fix ("Ask
    event_base_loop to finish when we add a pending stream") aims to respond
    to new streams as soon as they arrive, and this one aims to make sure
    that we definitely respond to all of the streams.
---
 src/or/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/or/main.c b/src/or/main.c
index cba19c3..d4d98ee 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1525,6 +1525,12 @@ run_scheduled_events(time_t now)
     circuit_expire_old_circs_as_needed(now);
   }
 
+  if (!net_is_disabled()) {
+    /* This is usually redundant with circuit_build_needed_circs() above,
+     * but it is very fast when there is no work to do. */
+    connection_ap_attach_pending(0);
+  }
+
   /* 5. We do housekeeping for each connection... */
   connection_or_set_bad_connections(NULL, 0);
   int i;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits