quinn icon indicating copy to clipboard operation
quinn copied to clipboard

Don't silence errors from `quinn-udp` code

Open thomaseizinger opened this issue 1 year ago • 19 comments

Currently, quinn-udp logs certain errors and returns Ok(()) even if the packet did not get sent. For example, a common one we see is

2024-08-21T00:34:51.104902Z  WARN quinn_udp: sendmsg error: Os { code: 101, kind: NetworkUnreachable, message: "Network unreachable" }, Transmit: { destination: [2600:1900:40b0:1504:0:94::]:3478, src_ip: None, enc: None, len: 108, segment_size: None }

This happens when we have an IPv6 interface but only with a link-local address. Thus, binding the socket to the unspecified address works but sending any kind of packet fails.

I would like to catch this in my application and disable the socket but I cannot because quinn-udp returns Ok(()).

Would you be willing to change this? It appears that ignoring a send error within library code is too opinionated and perhaps a layer above (quinn itself) would be better suited for this.

Note that I am not using quinn, we only use quinn-udp as a socket library.

Related: #1750.

thomaseizinger avatar Aug 21 '24 00:08 thomaseizinger