From eab0046d0ea87e7d80ff4dadf2e71dc326809521 Mon Sep 17 00:00:00 2001 From: Nick Mathewson <nickm@torproject.org> Date: Thu, 19 May 2022 08:04:57 -0400 Subject: [PATCH] Explain why we call update_status unconditionally. --- crates/tor-dirmgr/src/bootstrap.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/tor-dirmgr/src/bootstrap.rs b/crates/tor-dirmgr/src/bootstrap.rs index 863353e92e..009fb9d50e 100644 --- a/crates/tor-dirmgr/src/bootstrap.rs +++ b/crates/tor-dirmgr/src/bootstrap.rs @@ -331,6 +331,9 @@ async fn load_once<R: Runtime>( state.add_from_cache(documents) }; + // We have to update the status here regardless of the outcome: even if + // there was an error, we might have received partial information that + // changed our status. dirmgr.update_status(state.bootstrap_status()); outcome -- GitLab