From ac06643f7166b7a131643b4784b818a0bbf044c6 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Fri, 2 Jan 2026 13:14:12 +0100 Subject: [PATCH] pytest: test 03_02 stabilize (curl_ngtcp2) The special handling for draining server connections during a connect attempt was only done on CURLE_RECV_ERROR. But it may also happen when ngtcp2 errors on writing data. Check for CURLE_SEND_ERROR also. Ref: #20112 Closes #20162 --- lib/vquic/curl_ngtcp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index e80ece0f9c..ff455e52c5 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -2694,7 +2694,8 @@ static CURLcode cf_ngtcp2_connect(struct Curl_cfilter *cf, } out: - if(result == CURLE_RECV_ERROR && ctx->qconn && + if(ctx->qconn && + ((result == CURLE_RECV_ERROR) || (result == CURLE_SEND_ERROR)) && ngtcp2_conn_in_draining_period(ctx->qconn)) { const ngtcp2_ccerr *cerr = ngtcp2_conn_get_ccerr(ctx->qconn);