From 458c4b1df7033200e054b5d1cf78d269a457f4dd Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 24 Apr 2022 23:21:26 +0200 Subject: [PATCH] ngtcp2: avoid busy loop in low CWND situation Closes #8739 --- lib/vquic/ngtcp2.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.3