Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: change pinger to work in "better" manner #273

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
finito
  • Loading branch information
nitay committed Mar 12, 2023
commit f56a092572f2aeba6e4fbb5a1367c08cb639d84d
7 changes: 3 additions & 4 deletions pinger/src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@ impl Pinger for LinuxPinger {
}
}
} else {
let decoded_stderr = String::from_utf8(output.stderr.clone()).expect("Error decoding stderr");
tx.send(PingResult::Failed(output.status.to_string(), decoded_stderr)).ok();
tx.send(PingResult::Failed(output.status.to_string(), "Timeout reached".to_string())).ok();
}
}
Err(_) => {
panic!("Ping command failed - this should not happen, please verify the integrity of the ping command")
Err(e) => {
panic!("Ping command failed - this should not happen, please verify the integrity of the ping command: {}", e.to_string())
}
};
time::sleep(interval).await;
Expand Down