]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2: avoid busy loop in low CWND situation
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Sun, 24 Apr 2022 21:21:26 +0000 (23:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 24 Apr 2022 21:21:27 +0000 (23:21 +0200)
Closes #8739

lib/vquic/ngtcp2.c

index edcb35b445cb97cfe023748e67b256a55d5f82cb..543c45c435aa0d009a3b702eb31ceefc21b1e196 100644 (file)
@@ -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);