diff src/event/quic/ngx_event_quic_ack.c @ 8779:f52a2b77d406 quic

QUIC: generic buffering for stream input. Previously each stream had an input buffer. Now memory is allocated as bytes arrive. Generic buffering mechanism is used for this.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 05 May 2021 17:15:20 +0300
parents 4117aa7fa38e
children 004172345bdc
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ack.c
+++ b/src/event/quic/ngx_event_quic_ack.c
@@ -432,8 +432,6 @@ ngx_quic_detect_lost(ngx_connection_t *c
 void
 ngx_quic_resend_frames(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx)
 {
-    size_t                  n;
-    ngx_buf_t              *b;
     ngx_queue_t            *q;
     ngx_quic_frame_t       *f, *start;
     ngx_quic_stream_t      *qs;
@@ -497,13 +495,7 @@ ngx_quic_resend_frames(ngx_connection_t 
                 break;
             }
 
-            b = qs->b;
-            n = qs->fs->received + (b->pos - b->start) + (b->end - b->last);
-
-            if (f->u.max_stream_data.limit < n) {
-                f->u.max_stream_data.limit = n;
-            }
-
+            f->u.max_stream_data.limit = qs->recv_max_data;
             ngx_quic_queue_frame(qc, f);
             break;