diff options
Diffstat (limited to 'src/quic_sock.c')
-rw-r--r-- | src/quic_sock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/quic_sock.c b/src/quic_sock.c index c479249..f796513 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -686,14 +686,16 @@ int qc_snd_buf(struct quic_conn *qc, const struct buffer *buf, size_t sz, if (ret < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOTCONN || errno == EINPROGRESS) { + /* transient error */ if (errno == EAGAIN || errno == EWOULDBLOCK) qc->cntrs.socket_full++; else qc->cntrs.sendto_err++; - /* transient error */ - fd_want_send(qc->fd); - fd_cant_send(qc->fd); + if (qc_test_fd(qc)) { + fd_want_send(qc->fd); + fd_cant_send(qc->fd); + } TRACE_PRINTF(TRACE_LEVEL_USER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0, "UDP send failure errno=%d (%s)", errno, strerror(errno)); return 0; |