Drop runtime after task completion (#1196)
* Drop runtime after task completion * Update lighthouse/src/main.rs
This commit is contained in:
parent
ad4e5adabc
commit
f72094ca8d
@ -241,5 +241,9 @@ fn run<E: EthSpec>(
|
||||
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(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user