From 0690b3330cee7f7d9469300d2c16c7a6b850281a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 28 Aug 2019 12:19:42 +0200 Subject: ngtcp2: set flow control window to stream buffer size Closes #4274 --- lib/vquic/ngtcp2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/vquic') diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 9fa04b4c7..d616667d6 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -127,7 +127,8 @@ static int setup_initial_crypto_context(struct quicsocket *qs) return 0; } -static void quic_settings(ngtcp2_settings *s) +static void quic_settings(ngtcp2_settings *s, + uint64_t stream_buffer_size) { ngtcp2_settings_default(s); #ifdef DEBUG_NGTCP2 @@ -136,7 +137,7 @@ static void quic_settings(ngtcp2_settings *s) s->log_printf = NULL; #endif s->initial_ts = timestamp(); - s->max_stream_data_bidi_local = QUIC_MAX_STREAMS; + s->max_stream_data_bidi_local = stream_buffer_size; s->max_stream_data_bidi_remote = QUIC_MAX_STREAMS; s->max_stream_data_uni = QUIC_MAX_STREAMS; s->max_data = QUIC_MAX_DATA; @@ -703,7 +704,7 @@ CURLcode Curl_quic_connect(struct connectdata *conn, if(result) return result; - quic_settings(&qs->settings); + quic_settings(&qs->settings, data->set.buffer_size); qs->local_addrlen = sizeof(qs->local_addr); rv = getsockname(sockfd, (struct sockaddr *)&qs->local_addr, -- cgit v1.2.3