From 61496d8dad41525db95920737125c2942e07592c Mon Sep 17 00:00:00 2001 From: Age Manning Date: Wed, 27 May 2020 06:38:12 +1000 Subject: [PATCH] Revert runtime drop (#1198) --- lighthouse/environment/src/lib.rs | 2 +- lighthouse/src/main.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lighthouse/environment/src/lib.rs b/lighthouse/environment/src/lib.rs index e6076d49f1..8ba106d998 100644 --- a/lighthouse/environment/src/lib.rs +++ b/lighthouse/environment/src/lib.rs @@ -276,7 +276,7 @@ impl Environment { /// Shutdown the `tokio` runtime when all tasks are idle. pub fn shutdown_on_idle(self) { self.runtime - .shutdown_timeout(std::time::Duration::from_secs(5)) + .shutdown_timeout(std::time::Duration::from_secs(2)) } /// Sets the logger (and all child loggers) to log to a file. diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 495dbc5342..b037f6d786 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -241,9 +241,5 @@ fn run( drop(validator_client); // Shutdown the environment once all tasks have completed. - // Due to a bug in tokio: https://github.com/tokio-rs/tokio/issues/2314 - // the `shutdown_on_idle()` will wait until the entire timeout. For the time-being, we shutdown as soon as all - // threads have completed, by dropping the runtime. - //Ok(environment.shutdown_on_idle()) - Ok(()) + Ok(environment.shutdown_on_idle()) }