]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: cleaned up state while closing stream.
authorValentin Bartenev <vbart@nginx.com>
Wed, 24 Feb 2016 13:05:46 +0000 (16:05 +0300)
committerValentin Bartenev <vbart@nginx.com>
Wed, 24 Feb 2016 13:05:46 +0000 (16:05 +0300)
Without this the state might keep pointing to already closed stream.

src/http/v2/ngx_http_v2.c

index 4e378c9dc0d562ef49397376711cdca38486fbcd..0447534e78e8d28d2b7233284e28a99befcf514b 100644 (file)
@@ -3661,6 +3661,10 @@ ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc)
         }
     }
 
+    if (h2c->state.stream == stream) {
+        h2c->state.stream = NULL;
+    }
+
     node->stream = NULL;
 
     ngx_queue_insert_tail(&h2c->closed, &node->reuse);