From 617160895ce9bb403fe5a864925ffb1894f9086c Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Fri, 31 Aug 2018 12:56:23 -0500 Subject: 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. --- src/core/or/connection_or.c | 1 + src/core/or/relay.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') 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; } } -- cgit v1.2.3-54-g00ecf