nghttpx: Add configuration to enable ngtcp2 logging (no cmd-line opt yet)
This commit is contained in:
parent
028996aff8
commit
61aae5b927
|
@ -707,6 +707,9 @@ struct QUICConfig {
|
|||
struct {
|
||||
ev_tstamp idle;
|
||||
} timeout;
|
||||
struct {
|
||||
bool log;
|
||||
} debug;
|
||||
};
|
||||
|
||||
// custom error page
|
||||
|
|
|
@ -451,9 +451,14 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
|
|||
return -1;
|
||||
}
|
||||
|
||||
auto config = get_config();
|
||||
auto &quicconf = config->quic;
|
||||
|
||||
ngtcp2_settings settings;
|
||||
ngtcp2_settings_default(&settings);
|
||||
settings.log_printf = log_printf;
|
||||
if (quicconf.debug.log) {
|
||||
settings.log_printf = log_printf;
|
||||
}
|
||||
settings.initial_ts = quic_timestamp();
|
||||
settings.cc_algo = NGTCP2_CC_ALGO_BBR;
|
||||
settings.max_window = 6_m;
|
||||
|
@ -461,9 +466,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
|
|||
settings.max_udp_payload_size = SHRPX_MAX_UDP_PAYLOAD_SIZE;
|
||||
settings.rand_ctx.native_handle = &worker->get_randgen();
|
||||
|
||||
auto config = get_config();
|
||||
auto &quicconf = config->quic;
|
||||
|
||||
ngtcp2_transport_params params;
|
||||
ngtcp2_transport_params_default(¶ms);
|
||||
params.initial_max_streams_bidi = 100;
|
||||
|
|
Loading…
Reference in New Issue