Cap --window-bits to 23 for QUIC
This commit is contained in:
parent
c5102d3f81
commit
4b2f528719
|
@ -2033,6 +2033,7 @@ Options:
|
||||||
Default: 1
|
Default: 1
|
||||||
-w, --window-bits=<N>
|
-w, --window-bits=<N>
|
||||||
Sets the stream level initial window size to (2**<N>)-1.
|
Sets the stream level initial window size to (2**<N>)-1.
|
||||||
|
For QUIC, <N> is capped to 23 (roughly 8MiB).
|
||||||
Default: )"
|
Default: )"
|
||||||
<< config.window_bits << R"(
|
<< config.window_bits << R"(
|
||||||
-W, --connection-window-bits=<N>
|
-W, --connection-window-bits=<N>
|
||||||
|
|
|
@ -366,8 +366,10 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
|
||||||
}
|
}
|
||||||
settings.initial_ts = timestamp(worker->loop);
|
settings.initial_ts = timestamp(worker->loop);
|
||||||
auto ¶ms = settings.transport_params;
|
auto ¶ms = settings.transport_params;
|
||||||
params.initial_max_stream_data_bidi_local = (1 << config->window_bits) - 1;
|
auto max_stream_data =
|
||||||
params.initial_max_stream_data_uni = (1 << config->window_bits) - 1;
|
std::min((1 << 23) - 1, (1 << config->window_bits) - 1);
|
||||||
|
params.initial_max_stream_data_bidi_local = max_stream_data;
|
||||||
|
params.initial_max_stream_data_uni = max_stream_data;
|
||||||
params.initial_max_data = (1 << config->connection_window_bits) - 1;
|
params.initial_max_data = (1 << config->connection_window_bits) - 1;
|
||||||
params.initial_max_streams_bidi = 0;
|
params.initial_max_streams_bidi = 0;
|
||||||
params.initial_max_streams_uni = 100;
|
params.initial_max_streams_uni = 100;
|
||||||
|
|
Loading…
Reference in New Issue