mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Advertise our max_idle_timeout in transport parameters.
So we can easily tune how soon client would decide to close a connection.
This commit is contained in:
parent
d8d42e29e7
commit
685e7d1451
@ -1573,6 +1573,9 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp)
|
||||
len += ngx_quic_tp_len(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI,
|
||||
tp->initial_max_stream_data_uni);
|
||||
|
||||
len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
|
||||
tp->max_idle_timeout);
|
||||
|
||||
if (pos == NULL) {
|
||||
#if (NGX_QUIC_DRAFT_VERSION < 27)
|
||||
len += 2;
|
||||
@ -1606,6 +1609,9 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp)
|
||||
ngx_quic_tp_vint(NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI,
|
||||
tp->initial_max_stream_data_uni);
|
||||
|
||||
ngx_quic_tp_vint(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
|
||||
tp->max_idle_timeout);
|
||||
|
||||
ngx_quic_hexdump0(ngx_cycle->log, "transport parameters", pos, p - pos);
|
||||
|
||||
return p - pos;
|
||||
|
Loading…
Reference in New Issue
Block a user