]> git.kaiwu.me - nginx.git/commitdiff
QUIC: post stream events instead of calling their handlers.
authorRoman Arutyunyan <arut@nginx.com>
Tue, 23 Nov 2021 18:39:51 +0000 (21:39 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Tue, 23 Nov 2021 18:39:51 +0000 (21:39 +0300)
This potentially reduces the number of handler calls.

src/event/quic/ngx_event_quic_streams.c

index 60e693bbd2109efc01f52e96a30f61fb768ca68b..bfbe05c26144db99da6d994062ec6c6e01e271d3 100644 (file)
@@ -1120,7 +1120,7 @@ ngx_quic_handle_stream_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
         rev->ready = 1;
 
         if (rev->active) {
-            rev->handler(rev);
+            ngx_post_event(rev, &ngx_posted_events);
         }
     }
 
@@ -1367,7 +1367,7 @@ ngx_quic_handle_reset_stream_frame(ngx_connection_t *c,
     }
 
     if (rev->active) {
-        rev->handler(rev);
+        ngx_post_event(rev, &ngx_posted_events);
     }
 
     return NGX_OK;
@@ -1436,7 +1436,7 @@ ngx_quic_handle_stop_sending_frame(ngx_connection_t *c,
     wev = qs->connection->write;
 
     if (wev->active) {
-        wev->handler(wev);
+        ngx_post_event(wev, &ngx_posted_events);
     }
 
     return NGX_OK;