mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-21 15:41:44 +00:00
With the recent lobbying effort in `quinn-udp`, we were able to get `try_send` APIs for the UDP socket that doesn't silence any errors while sending datagrams. Originally, the reasoning in `quinn-udp` was that because UDP is an unreliable protocol anyway, errors don't need to be surfaced because there must be upper-level mechanisms for retrying messages. Whilst that is true, getting immediate feedback that something isn't working can also be very beneficial. For example, if you don't have proper IPv6 connectivity on a socket, the syscall will immediately fail with `DestinationUnreachable`. Within Firezone, we use these UDP sockets to send all kinds of messages, including DNS queries to upstream servers. In case that doesn't work, failing instantly allows us to send a SERVFAIL error back to the OS right away instead of having to wait for a timeout. Additionally, `quinn-udp` logs these send errors on WARN which cause unnecessary noise in Sentry. Resolves: #6353.