mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 17:01:02 +00:00
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:
@@ -236,7 +236,7 @@ impl<C: SubstrateCli> Runner<C> {
|
|||||||
self.tokio_runtime.block_on(main(task_manager.future().fuse()))
|
self.tokio_runtime.block_on(main(task_manager.future().fuse()))
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string())?;
|
||||||
task_manager.terminate();
|
task_manager.terminate();
|
||||||
drop(task_manager);
|
drop(self.tokio_runtime);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user