Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean shutdown for subcommands
  • Loading branch information
cecton committed Aug 18, 2020
commit 0ff776d752ed9ee6a03e4ee0ea1ac49b3c74a437
4 changes: 1 addition & 3 deletions client/cli/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ where
pin_mut!(f);

tokio_runtime.block_on(main(f)).map_err(|e| e.to_string())?;

task_manager.terminate();
drop(tokio_runtime);
task_manager.clean_shutdown();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference? And why isn't clean_shutdown being called in Drop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, clean_shutdown is async.... wait, I forgot the .await!!! 😓


Ok(())
}
Expand Down