diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-08-31 12:56:23 -0500 |
---|---|---|
committer | Taylor Yu <catalyst@torproject.org> | 2018-09-10 15:20:50 -0500 |
commit | 617160895ce9bb403fe5a864925ffb1894f9086c (patch) | |
tree | 812b243a81dd6c54516cbc6e3cde2b8e5859ceb4 /src/core | |
parent | 687bf3ea645ef8c5ce8c9f02a25274121ca13318 (diff) | |
download | tor-617160895ce9bb403fe5a864925ffb1894f9086c.tar.gz tor-617160895ce9bb403fe5a864925ffb1894f9086c.zip |
Defer reporting directory bootstrap progress
Existing cached directory information can cause misleadingly high
bootstrap percentages. To improve user experience, defer reporting of
directory information progress until at least one connection has
succeeded to a relay or bridge.
Closes ticket 27169.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/connection_or.c | 1 | ||||
-rw-r--r-- | src/core/or/relay.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index 08371d1ad7..e6b2354012 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -705,6 +705,7 @@ connection_or_finished_connecting(or_connection_t *or_conn) log_debug(LD_HANDSHAKE,"OR connect() to router at %s:%u finished.", conn->address,conn->port); control_event_bootstrap(BOOTSTRAP_STATUS_HANDSHAKE, 0); + control_event_boot_first_orconn(); if (proxy_type != PROXY_NONE) { /* start proxy handshake */ diff --git a/src/core/or/relay.c b/src/core/or/relay.c index 6e1adfaff3..1d0be0c894 100644 --- a/src/core/or/relay.c +++ b/src/core/or/relay.c @@ -1389,8 +1389,8 @@ connection_edge_process_relay_cell_not_open( case DIR_PURPOSE_FETCH_SERVERDESC: case DIR_PURPOSE_FETCH_MICRODESC: if (TO_DIR_CONN(dirconn)->router_purpose == ROUTER_PURPOSE_GENERAL) - control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, - count_loading_descriptors_progress()); + control_event_boot_dir(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, + count_loading_descriptors_progress()); break; } } |