summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2026-04-15 22:22:43 +0400
committerSergey Kandaurov <s.kandaurov@f5.com>2026-04-16 15:25:55 +0400
commitea72fa1d92af638e23def2da1790b9b0566bd23b (patch)
treed508d07b31186ae0183156b98200ed4f38c8fb23 /src/event
parent4dd7ec9ae48df272cef2a1ecd4de0a237783828a (diff)
downloadnginx-ea72fa1d92af638e23def2da1790b9b0566bd23b.tar.gz
nginx-ea72fa1d92af638e23def2da1790b9b0566bd23b.tar.bz2
QUIC: simplified ngx_quic_cbs_recv_rcd()
There's no need in for-loop, a single buffer is fed at a time.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/quic/ngx_event_quic_ssl.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c
index 4e84f8102..705f39f6c 100644
--- a/src/event/quic/ngx_event_quic_ssl.c
+++ b/src/event/quic/ngx_event_quic_ssl.c
@@ -152,27 +152,19 @@ ngx_quic_cbs_recv_rcd(ngx_ssl_conn_t *ssl_conn,
qc = ngx_quic_get_connection(c);
ctx = ngx_quic_get_send_ctx(qc, qc->read_level);
- for (cl = ctx->crypto.chain; cl; cl = cl->next) {
- b = cl->buf;
-
- if (b->sync) {
- /* hole */
+ cl = ctx->crypto.chain;
- *data = NULL;
- *bytes_read = 0;
+ if (cl == NULL || cl->buf->sync) {
+ *data = NULL;
+ *bytes_read = 0;
- break;
- }
+ } else {
+ b = cl->buf;
*data = b->pos;
*bytes_read = b->last - b->pos;
-
- break;
}
- *data = NULL;
- *bytes_read = 0;
-
return 1;
}