]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Always call connection_ap_attach_pending() once a second.
authorNick Mathewson <nickm@torproject.org>
Mon, 31 Oct 2016 18:42:26 +0000 (14:42 -0400)
committerRoger Dingledine <arma@torproject.org>
Wed, 2 Nov 2016 00:09:44 +0000 (20:09 -0400)
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

index cba19c38be69714730c6a352ed2851fbe2d4538b..d4d98ee317e3a93da4f2b48c4f05928453ce5af2 100644 (file)
@@ -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;