]> git.kaiwu.me - nginx.git/commitdiff
QUIC: do not send STOP_SENDING after STREAM fin.
authorRoman Arutyunyan <arut@nginx.com>
Sun, 6 Sep 2020 11:51:23 +0000 (14:51 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Sun, 6 Sep 2020 11:51:23 +0000 (14:51 +0300)
Previously STOP_SENDING was sent to client upon stream closure if rev->eof and
rev->error were not set.  This was an indirect indication that no RESET_STREAM
or STREAM fin has arrived.  But it is indeed possible that rev->eof is not set,
but STREAM fin has already been received, just not read out by the application.
In this case sending STOP_SENDING does not make sense and can be misleading for
some clients.

src/event/ngx_event_quic.c

index f158b0fc7c6be09afad573bb1be4916e8ad87660..2364caebf52a7b2251835ad1f1ee1f9511b351e9 100644 (file)
@@ -4895,7 +4895,7 @@ ngx_quic_stream_cleanup_handler(void *data)
     if ((qs->id & NGX_QUIC_STREAM_SERVER_INITIATED) == 0
         || (qs->id & NGX_QUIC_STREAM_UNIDIRECTIONAL) == 0)
     {
-        if (!c->read->eof && !c->read->error) {
+        if (!c->read->pending_eof && !c->read->error) {
             frame = ngx_quic_alloc_frame(pc, 0);
             if (frame == NULL) {
                 return;