From: Amaury Denoyelle Date: Wed, 18 May 2022 16:14:12 +0000 (+0200) Subject: BUG/MINOR: quic: break for error on sendto X-Git-Tag: v2.6-dev11~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fa666650f0cd2d9390764fdcd2b14a8200397cb;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: break for error on sendto If sendto returns an error, we should not retry the call and break from the sending loop. An exception is made for EINTR which allows to retry immediately the syscall. This bug caused an infinite loop reproduced when the process is in the closing state by SIGUSR1 but there is still QUIC data emission left. --- diff --git a/src/quic_sock.c b/src/quic_sock.c index 2cc5a7f033..71fe0b7f59 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -342,6 +342,7 @@ size_t qc_snd_buf(struct quic_conn *qc, const struct buffer *buf, size_t count, else if (ret == 0 || errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOTCONN || errno == EINPROGRESS) { /* TODO must be handle properly. It is justified for UDP ? */ qc->sendto_err++; + break; } else if (errno != EINTR) { /* TODO must be handle properly. It is justified for UDP ? */