Revert runtime drop (#1198)

This commit is contained in:
Age Manning 2020-05-27 06:38:12 +10:00 committed by GitHub
parent 5122b2c13a
commit 61496d8dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -276,7 +276,7 @@ impl<E: EthSpec> Environment<E> {
/// 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.

View File

@ -241,9 +241,5 @@ fn run<E: EthSpec>(
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())
}