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
This commit is contained in:
Stefan Eissing 2026-01-02 13:14:12 +01:00 committed by Viktor Szakats
parent 46bda31702
commit ac06643f71
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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);