From: Stefan Eissing Date: Fri, 2 Jan 2026 12:14:12 +0000 (+0100) Subject: pytest: test 03_02 stabilize (curl_ngtcp2) X-Git-Tag: curl-8_18_0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac06643f7166b7a131643b4784b818a0bbf044c6;p=thirdparty%2Fcurl.git 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 --- 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);