diff src/event/quic/ngx_event_quic_ack.c @ 8990:b42a041d23a2 quic

QUIC: introduced explicit stream states. This allows to eliminate the usage of stream connection event flags for tracking stream state.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 31 Jan 2022 09:46:02 +0300
parents da112e7f8de6
children a2fbae359828
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ack.c
+++ b/src/event/quic/ngx_event_quic_ack.c
@@ -617,10 +617,13 @@ ngx_quic_resend_frames(ngx_connection_t 
         case NGX_QUIC_FT_STREAM:
             qs = ngx_quic_find_stream(&qc->streams.tree, f->u.stream.stream_id);
 
-            if (qs && qs->connection->write->error) {
-                /* RESET_STREAM was sent */
-                ngx_quic_free_frame(c, f);
-                break;
+            if (qs) {
+                if (qs->send_state == NGX_QUIC_STREAM_SEND_RESET_SENT
+                    || qs->send_state == NGX_QUIC_STREAM_SEND_RESET_RECVD)
+                {
+                    ngx_quic_free_frame(c, f);
+                    break;
+                }
             }
 
             /* fall through */