Revert runtime drop (#1198)
This commit is contained in:
parent
5122b2c13a
commit
61496d8dad
@ -276,7 +276,7 @@ impl<E: EthSpec> Environment<E> {
|
|||||||
/// Shutdown the `tokio` runtime when all tasks are idle.
|
/// Shutdown the `tokio` runtime when all tasks are idle.
|
||||||
pub fn shutdown_on_idle(self) {
|
pub fn shutdown_on_idle(self) {
|
||||||
self.runtime
|
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.
|
/// Sets the logger (and all child loggers) to log to a file.
|
||||||
|
@ -241,9 +241,5 @@ fn run<E: EthSpec>(
|
|||||||
drop(validator_client);
|
drop(validator_client);
|
||||||
|
|
||||||
// Shutdown the environment once all tasks have completed.
|
// Shutdown the environment once all tasks have completed.
|
||||||
// Due to a bug in tokio: https://github.com/tokio-rs/tokio/issues/2314
|
Ok(environment.shutdown_on_idle())
|
||||||
// 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(())
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user