Consider moving logging out of publisher reactor
netidr_event = netdir_events.next().fuse() => {
// The consensus changed. Grab a new NetDir.
let netdir = match self.dir_provider.netdir(Timeliness::Timely) {
Ok(y) => y,
Err(e) => {
error_report!(e, "HS service {}: netdir unavailable. Retrying...", self.imm.nickname);
// Hopefully a netdir will appear in the future.
// in the meantime, suspend operations.
//
// TODO HSS there is a bug here: we stop reading on our inputs
// including eg publish_status_rx, but it is our job to log some of
// these things. While we are waiting for a netdir, all those messages
// are "stuck"; they'll appear later, with misleading timestamps.
//
// Probably this should be fixed by moving the logging
// out of the reactor, where it won't be blocked.
wait_for_netdir(self.dir_provider.as_ref(), Timeliness::Timely)
.await?
}
};
self.handle_consensus_change(netdir).await?;
}