Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_output.c @ 9172:4ccb0d973206
QUIC: reusing crypto contexts for packet protection.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 20 Oct 2023 18:05:07 +0400 |
parents | 60c4e8d3151f |
children | 7ec761f0365f |
comparison
equal
deleted
inserted
replaced
9171:f98636db77ef | 9172:4ccb0d973206 |
---|---|
939 pkt.payload.len = len; | 939 pkt.payload.len = len; |
940 | 940 |
941 res.data = dst; | 941 res.data = dst; |
942 | 942 |
943 if (ngx_quic_encrypt(&pkt, &res) != NGX_OK) { | 943 if (ngx_quic_encrypt(&pkt, &res) != NGX_OK) { |
944 ngx_quic_keys_cleanup(pkt.keys); | |
944 return NGX_ERROR; | 945 return NGX_ERROR; |
945 } | 946 } |
946 | 947 |
947 if (ngx_quic_send(c, res.data, res.len, c->sockaddr, c->socklen) < 0) { | 948 if (ngx_quic_send(c, res.data, res.len, c->sockaddr, c->socklen) < 0) { |
948 return NGX_ERROR; | 949 ngx_quic_keys_cleanup(pkt.keys); |
949 } | 950 return NGX_ERROR; |
951 } | |
952 | |
953 ngx_quic_keys_cleanup(pkt.keys); | |
950 | 954 |
951 return NGX_DONE; | 955 return NGX_DONE; |
952 } | 956 } |
953 | 957 |
954 | 958 |