Drop the tokio runtime before the task_manager (#6548)

* Initial commit

Forked at: ece0364170
Parent branch: origin/master

* Drop the tokio runtime before the task_manager

The tokio runtime must be dropped before the task_manager. Otherwise the objects the task_manager
keep alive are dropped before the tasks are finished.
This commit is contained in:
Cecile Tonglet
2020-07-02 13:02:08 +02:00
committed by GitHub
parent 5f751e4472
commit 7b0028d75a
+1 -1
View File
@@ -236,7 +236,7 @@ impl<C: SubstrateCli> Runner<C> {
self.tokio_runtime.block_on(main(task_manager.future().fuse()))
.map_err(|e| e.to_string())?;
task_manager.terminate();
drop(task_manager);
drop(self.tokio_runtime);
Ok(())
}