]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: consider EBADF as critical on send()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 27 Feb 2023 16:31:55 +0000 (17:31 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 28 Feb 2023 09:51:25 +0000 (10:51 +0100)
EBADF on sendto() is considered as a fatal error. As such, it is removed
from the list of the transient errors. The connection will be killed
when encountered.

For the record, EBADF can be encountered on process termination with the
listener socket.

This should be backported up to 2.7.

src/quic_sock.c

index 95f771135ea595e804379f3ee5457fd0ea644e5f..77a2a89f551c3e588ca211aab5193f3f0196670f 100644 (file)
@@ -619,7 +619,7 @@ int qc_snd_buf(struct quic_conn *qc, const struct buffer *buf, size_t sz,
                                     &quic_stats_module);
 
                if (errno == EAGAIN || errno == EWOULDBLOCK ||
-                   errno == ENOTCONN || errno == EINPROGRESS || errno == EBADF) {
+                   errno == ENOTCONN || errno == EINPROGRESS) {
                        if (errno == EAGAIN || errno == EWOULDBLOCK)
                                HA_ATOMIC_INC(&prx_counters->socket_full);
                        else