Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Flush telemetry on supervisor agent error (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranweiler authored Sep 22, 2020
1 parent 08d1ea0 commit 93566d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/agent/onefuzz-supervisor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ fn run(opt: RunOpt) -> Result<()> {
let mut rt = tokio::runtime::Runtime::new()?;
let result = rt.block_on(run_agent(config));

if let Err(err) = result {
if let Err(err) = &result {
error!("error running supervisor agent: {}", err);
return Err(err);
}

onefuzz::telemetry::try_flush_and_close();

Ok(())
result
}

fn load_config(opt: RunOpt) -> Result<StaticConfig> {
Expand Down

0 comments on commit 93566d6

Please sign in to comment.