mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 01:47:55 +00:00
Fix graceful shutdown skipped if future ends with error (#6769)
* Initial commit
Forked at: 5060324b91
Parent branch: origin/master
* Fix graceful shutdown skipped if future ends with error
* apply suggestion
This commit is contained in:
@@ -229,10 +229,9 @@ impl<C: SubstrateCli> Runner<C> {
|
||||
) -> Result<()> {
|
||||
self.print_node_infos();
|
||||
let mut task_manager = initialise(self.config)?;
|
||||
self.tokio_runtime.block_on(main(task_manager.future().fuse()))
|
||||
.map_err(|e| e.to_string())?;
|
||||
let res = self.tokio_runtime.block_on(main(task_manager.future().fuse()));
|
||||
self.tokio_runtime.block_on(task_manager.clean_shutdown());
|
||||
Ok(())
|
||||
res.map_err(|e| e.to_string().into())
|
||||
}
|
||||
|
||||
/// A helper function that runs a command with the configuration of this node
|
||||
|
||||
Reference in New Issue
Block a user