From e5aa02bbd4658186c7c097a31a5332a4369105e7 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Tue, 12 Nov 2019 16:46:06 -0500 Subject: [PATCH] Remove special wait, unneeded for seed Co-Authored-By: Henry de Valence --- zebrad/src/commands/seed.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/zebrad/src/commands/seed.rs b/zebrad/src/commands/seed.rs index bb8603d7..7d7fdba6 100644 --- a/zebrad/src/commands/seed.rs +++ b/zebrad/src/commands/seed.rs @@ -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::() .expect("TokioComponent should be available") .rt - .block_on(fut); + .block_on(self.seed()); } }