ngtcp2: avoid busy loop in low CWND situation

Closes #8739
This commit is contained in:
Tatsuhiro Tsujikawa 2022-04-24 23:21:26 +02:00 committed by Daniel Stenberg
parent b82d879817
commit 458c4b1df7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

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