-
Notifications
You must be signed in to change notification settings - Fork 2
Silence error sending msg over udp[CPP-489] #343
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
Conversation
if let Err(err) = client.send(&frame) { | ||
error!("Error sending to device: {}", err); | ||
} | ||
if let Err(_e) = client.send(&frame) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there is an accepted way to beat the linter for "not handling" a result. Surprisingly difficult task as it was suggesting options that it would then flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put a comment within the if that says we're intentionally squelching the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One ask, otherwise looks good
if let Err(err) = client.send(&frame) { | ||
error!("Error sending to device: {}", err); | ||
} | ||
if let Err(_e) = client.send(&frame) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put a comment within the if that says we're intentionally squelching the error?
The std::net::UdpSocket we are using implements a nontraditional version of udp with a connection. "Although UDP is a connectionless protocol, this implementation provides an interface to set an address where data should be sent and received from." https://doc.rust-lang.org/std/net/struct.UdpSocket.html