diff options
author | Roger Dingledine <arma@torproject.org> | 2016-10-31 00:23:53 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-11-01 19:52:55 -0400 |
commit | d89804a69d1b1f92076d47aac953776e1a3cd867 (patch) | |
tree | 978cf8e4ccd75dccd81ae4866d73d844293acc8c /src/or/connection_edge.c | |
parent | 28b755e66007c94521c45bdda07abdf3bcd59656 (diff) | |
download | tor-d89804a69d1b1f92076d47aac953776e1a3cd867.tar.gz tor-d89804a69d1b1f92076d47aac953776e1a3cd867.zip |
Ask event_base_loop to finish when we add a pending stream
Fixes bug 19969; bugfix on b1d56fc58. We can fix this some more in
later Tors, but for now, this is probably the right fix for us.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 754e9762ea..8098fb017b 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -892,6 +892,15 @@ connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn, untried_pending_connections = 1; smartlist_add(pending_entry_connections, entry_conn); + + /* Work-around for bug 19969: we handle pending_entry_connections at + * the end of run_main_loop_once(), but in many cases that function will + * take a very long time, if ever, to finish its call to event_base_loop(). + * + * So the fix is to tell it right now that it ought to finish its loop at + * its next available opportunity. + */ + tell_event_loop_to_finish(); } /** Mark <b>entry_conn</b> as no longer waiting for a circuit. */ |