Skip to content

Commit

Permalink
feat(cli): add metrics server to iroh doctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed May 15, 2024
1 parent 9d71fd8 commit 00b57a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion iroh-cli/src/commands/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,8 @@ fn inspect_ticket(ticket: &str, zbase32: bool) -> anyhow::Result<()> {
pub async fn run(command: Commands, config: &NodeConfig) -> anyhow::Result<()> {
let data_dir = iroh_data_root()?;
let _guard = crate::logging::init_terminal_and_file_logging(&config.file_logs, &data_dir)?;
match command {
let metrics_fut = super::start::start_metrics_server(config.metrics_addr);
let cmd_res = match command {
Commands::Report {
stun_host,
stun_port,
Expand Down Expand Up @@ -1200,7 +1201,11 @@ pub async fn run(command: Commands, config: &NodeConfig) -> anyhow::Result<()> {

Ok(())
}
};
if let Some(metrics_fut) = metrics_fut {
metrics_fut.abort();
}
cmd_res
}

async fn run_plotter<B: Backend>(
Expand Down

0 comments on commit 00b57a0

Please sign in to comment.