From e9ecada0f01403a7b4cf142d5e10325fdcc2c8db Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Thu, 5 Mar 2026 11:18:47 +0200 Subject: [PATCH] Log and drop send errors instead of forwarding them, which tears down the connection --- noq/src/connection.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/noq/src/connection.rs b/noq/src/connection.rs index 9444d01d9..88c571324 100644 --- a/noq/src/connection.rs +++ b/noq/src/connection.rs @@ -1458,7 +1458,14 @@ impl State { self.buffered_transmit = Some(t); return Ok(false); } - Poll::Ready(Err(e)) => return Err(e), + Poll::Ready(Err(e)) => { + // Treat send errors as dropped packets rather than + // killing the connection. UDP is unreliable by nature, + // and transient errors (e.g. ENOMEM on embedded lwIP) + // should not terminate a QUIC connection. If the socket + // is truly dead, QUIC idle timeout will clean up. + tracing::debug!("UDP send error (packet dropped): {e}"); + } Poll::Ready(Ok(())) => {} }