]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed triggering stream read event (ticket #2409).
authorRoman Arutyunyan <arut@nginx.com>
Wed, 23 Nov 2022 14:50:26 +0000 (18:50 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 23 Nov 2022 14:50:26 +0000 (18:50 +0400)
If a client packet carrying a stream data frame is not acked due to packet loss,
the stream data is retransmitted later by client.  It's also possible that the
retransmitted range is bigger than before due to more stream data being
available by then.  If the original data was read out by the application,
there would be no read event triggered by the retransmitted frame, even though
it contains new data.

src/event/quic/ngx_event_quic_streams.c

index 78650b04f0aca443b7330f0133ba4889b78c128f..73272ff95550d4c6608e5e9403512e5ac5c1c620 100644 (file)
@@ -1147,7 +1147,7 @@ ngx_quic_handle_stream_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
         return ngx_quic_close_stream(qs);
     }
 
-    if (f->offset == qs->recv_offset) {
+    if (f->offset <= qs->recv_offset) {
         ngx_quic_set_event(qs->connection->read);
     }