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.
This commit is contained in:
Amaury Denoyelle 2022-05-18 18:14:12 +02:00
parent c95eaefbfd
commit 8fa666650f

View File

@ -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 ? */