]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed resetting stream wev->ready flag.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 9 Feb 2022 11:49:05 +0000 (14:49 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 9 Feb 2022 11:49:05 +0000 (14:49 +0300)
Previously, the flag could be reset after send_chain() with a limit, even
though there was room for more data.  The application then started waiting for
a write event notification, which never happened.

Now the wev->ready flag is only reset when flow control is exhausted.

src/event/quic/ngx_event_quic_streams.c

index c0f32394d7a04815ac883e88d4caeb03e6e27e6c..8b13f6edc0f1f4db329dee125960b09b95dc24ad 100644 (file)
@@ -883,7 +883,7 @@ ngx_quic_stream_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 
     ngx_quic_queue_frame(qc, frame);
 
-    if (in) {
+    if (flow == (off_t) n) {
         wev->ready = 0;
     }