]> git.kaiwu.me - nginx.git/commitdiff
QUIC: reset stream only once.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 22 Sep 2021 11:02:56 +0000 (14:02 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 22 Sep 2021 11:02:56 +0000 (14:02 +0300)
src/event/quic/ngx_event_quic_streams.c

index 7ad443eecce066f25fbf9a03eb2c2320c508823e..0bd487f83f9c5a3216418151d6c676d7c48cc0e7 100644 (file)
@@ -221,6 +221,12 @@ ngx_quic_reset_stream(ngx_connection_t *c, ngx_uint_t err)
     ngx_quic_stream_t      *qs;
     ngx_quic_connection_t  *qc;
 
+    wev = c->write;
+
+    if (wev->error) {
+        return NGX_OK;
+    }
+
     qs = c->quic;
     pc = qs->parent;
     qc = ngx_quic_get_connection(pc);
@@ -238,7 +244,6 @@ ngx_quic_reset_stream(ngx_connection_t *c, ngx_uint_t err)
 
     ngx_quic_queue_frame(qc, frame);
 
-    wev = c->write;
     wev->error = 1;
     wev->ready = 1;