aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index cf24d9b..db0edf7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -73,11 +73,10 @@ async fn main() {
states[id as usize] = State::Received { rtt: rrt, ttl };
}
}
- PingResult::NoPingErr { id, error } => {
- // NOTE: Maybe we should quit, I don't know.
- if (id as usize) < states.len() {
- states[id as usize] = State::SendError;
- }
+ PingResult::NoPingErr { id: _, ref error } => {
+ // FEAT: It should fail if states is empty and print a informative characters on the line otherwise
+ eprintln!("Error: {}", error);
+ std::process::exit(2);
}
}
}