Skip to content

Commit

Permalink
Remove special wait, unneeded for seed
Browse files Browse the repository at this point in the history
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
  • Loading branch information
dconnolly and hdevalence committed Nov 13, 2019
1 parent bdba529 commit e5aa02b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions zebrad/src/commands/seed.rs
Original file line number Diff line number Diff line change
@@ -98,30 +98,13 @@ impl Runnable for SeedCmd {
fn run(&self) {
use crate::components::tokio::TokioComponent;

let wait = tokio::future::pending::<()>();
// Combine the seed future with an infinite wait
// so that the program has to be explicitly killed and
// won't die before all tracing messages are written.
let fut = futures::future::join(
async {
match self.seed().await {
Ok(()) => {}
Err(e) => {
// Print any error that occurs.
error!(?e);
}
}
},
wait,
);

let _ = app_reader()
.state()
.components
.get_downcast_ref::<TokioComponent>()
.expect("TokioComponent should be available")
.rt
.block_on(fut);
.block_on(self.seed());
}
}

0 comments on commit e5aa02b

Please sign in to comment.