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/feature/dircache/directory.c | |
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/feature/dircache/directory.c')
-rw-r--r-- | src/feature/dircache/directory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/feature/dircache/directory.c b/src/feature/dircache/directory.c index de0bcdbfa7..b94c5317af 100644 --- a/src/feature/dircache/directory.c +++ b/src/feature/dircache/directory.c @@ -2226,8 +2226,8 @@ load_downloaded_routers(const char *body, smartlist_t *which, added = router_load_routers_from_string(body, NULL, SAVED_NOWHERE, which, descriptor_digests, buf); if (added && general) - control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, - count_loading_descriptors_progress()); + control_event_boot_dir(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, + count_loading_descriptors_progress()); return added; } @@ -2949,8 +2949,8 @@ handle_response_fetch_microdesc(dir_connection_t *conn, dir_microdesc_download_failed(which, status_code, conn->identity_digest); } if (mds && smartlist_len(mds)) { - control_event_bootstrap(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, - count_loading_descriptors_progress()); + control_event_boot_dir(BOOTSTRAP_STATUS_LOADING_DESCRIPTORS, + count_loading_descriptors_progress()); directory_info_has_arrived(now, 0, 1); } SMARTLIST_FOREACH(which, char *, cp, tor_free(cp)); |