summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-31 14:42:26 -0400
committerRoger Dingledine <arma@torproject.org>2016-11-01 20:09:44 -0400
commitb2f82d45b7e0166a8de3a7b6d38e288dd1e6d96e (patch)
tree1eafb7f4846d969cee3ca22fc9b68d95331f7fa7
parentd89804a69d1b1f92076d47aac953776e1a3cd867 (diff)
downloadtor-b2f82d45b7e0166a8de3a7b6d38e288dd1e6d96e.tar.gz
tor-b2f82d45b7e0166a8de3a7b6d38e288dd1e6d96e.zip
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.
-rw-r--r--src/or/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index cba19c38be..d4d98ee317 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;