From f72094ca8d4b10d2981e41315b868d07d8d40fee Mon Sep 17 00:00:00 2001 From: Age Manning Date: Tue, 26 May 2020 15:34:33 +1000 Subject: [PATCH] Drop runtime after task completion (#1196) * Drop runtime after task completion * Update lighthouse/src/main.rs --- lighthouse/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index b037f6d78..495dbc534 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -241,5 +241,9 @@ fn run( drop(validator_client); // Shutdown the environment once all tasks have completed. - Ok(environment.shutdown_on_idle()) + // 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(()) }