From: Tatsuhiro Tsujikawa Date: Sun, 24 Apr 2022 21:21:26 +0000 (+0200) Subject: ngtcp2: avoid busy loop in low CWND situation X-Git-Tag: curl-7_83_0~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=458c4b1df7033200e054b5d1cf78d269a457f4dd;p=thirdparty%2Fcurl.git ngtcp2: avoid busy loop in low CWND situation Closes #8739 --- diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index edcb35b445..543c45c435 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -879,6 +879,7 @@ static int ng_getsock(struct Curl_easy *data, struct connectdata *conn, /* we're still uploading or the HTTP/2 layer wants to send data */ if((k->keepon & (KEEP_SEND|KEEP_SEND_PAUSE)) == KEEP_SEND && (!stream->h3out || stream->h3out->used < H3_SEND_SIZE) && + ngtcp2_conn_get_cwnd_left(qs->qconn) && ngtcp2_conn_get_max_data_left(qs->qconn) && nghttp3_conn_is_stream_writable(qs->h3conn, stream->stream3_id)) bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);