tor-dirmgr: report bootstrap success on all successful cases.

Previously we would sometimes fail to report that we had
successfully bootstrapped.
This commit is contained in:
Nick Mathewson 2021-10-13 13:01:55 -04:00
parent 16767fb517
commit e9399ec6c0
1 changed files with 5 additions and 0 deletions

View File

@ -353,6 +353,11 @@ impl<R: Runtime> DirMgr<R> {
retry_config.n_attempts()
);
return Err(Error::CantAdvanceState.into());
} else {
// Report success, if appropriate.
if let Some(send_done) = on_complete.take() {
let _ = send_done.send(());
}
}
let reset_at = state.reset_time();