summaryrefslogtreecommitdiffhomepage
path: root/src/event/ngx_event_quic_transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event_quic_transport.c')
-rw-r--r--src/event/ngx_event_quic_transport.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c
index 626da6c9e..756b679e5 100644
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -1883,11 +1883,9 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp,
}
#endif
- if (tp->sr_enabled) {
- len += ngx_quic_varint_len(NGX_QUIC_TP_SR_TOKEN);
- len += ngx_quic_varint_len(NGX_QUIC_SR_TOKEN_LEN);
- len += NGX_QUIC_SR_TOKEN_LEN;
- }
+ len += ngx_quic_varint_len(NGX_QUIC_TP_SR_TOKEN);
+ len += ngx_quic_varint_len(NGX_QUIC_SR_TOKEN_LEN);
+ len += NGX_QUIC_SR_TOKEN_LEN;
if (pos == NULL) {
return len;
@@ -1935,11 +1933,9 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp,
}
#endif
- if (tp->sr_enabled) {
- ngx_quic_build_int(&p, NGX_QUIC_TP_SR_TOKEN);
- ngx_quic_build_int(&p, NGX_QUIC_SR_TOKEN_LEN);
- p = ngx_cpymem(p, tp->sr_token, NGX_QUIC_SR_TOKEN_LEN);
- }
+ ngx_quic_build_int(&p, NGX_QUIC_TP_SR_TOKEN);
+ ngx_quic_build_int(&p, NGX_QUIC_SR_TOKEN_LEN);
+ p = ngx_cpymem(p, tp->sr_token, NGX_QUIC_SR_TOKEN_LEN);
return p - pos;
}