From 3dde0d86dd4945a37d195a32578c707465851ede Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 19 May 2022 11:53:56 +0200 Subject: [PATCH] MINOR: quic: detect EBADF on sendto() EBADF can be encountered during process termination after fd listener has been reset to -1. --- src/quic_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quic_sock.c b/src/quic_sock.c index e56372ed6..164993006 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -343,7 +343,7 @@ size_t qc_snd_buf(struct quic_conn *qc, const struct buffer *buf, size_t count, /* try again */ continue; } - else if (ret == 0 || errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOTCONN || errno == EINPROGRESS) { + else if (ret == 0 || errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOTCONN || errno == EINPROGRESS || errno == EBADF) { /* TODO must be handle properly. It is justified for UDP ? */ qc->sendto_err++; break; -- 2.47.3