Improve pinger error handling
This commit is contained in:
1 parent
290450ac1e
commit
9a1901b213
3 files changed
+29
-16
No files matched your search
+9
-6
@@ -51,15 +51,18 @@ impl PingListener for PingerICMPEchoListener {
|
||||
+ (time_now.tv_nsec() as f64 / 1e9),
|
||||
});
|
||||
}
|
||||
_ => {
|
||||
todo!()
|
||||
type_ => {
|
||||
return Err(PingError::InvalidType(format!("{:?}", type_)));
|
||||
}
|
||||
},
|
||||
Some(Icmpv6(_)) => {
|
||||
todo!()
|
||||
Some(Icmpv6(slice)) => {
|
||||
return Err(PingError::InvalidProtocol(format!("{:?}", slice)));
|
||||
}
|
||||
_ => {
|
||||
unimplemented!()
|
||||
Some(type_) => {
|
||||
return Err(PingError::InvalidProtocol(format!("{:?}", type_)));
|
||||
}
|
||||
None => {
|
||||
return Err(PingError::NoTransport);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user