changeset 6410:c6ccc1ea9450

HTTP/2: cleaned up state while closing stream. Without this the state might keep pointing to already closed stream.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 24 Feb 2016 16:05:46 +0300
parents 71edd9192f24
children 8ec349bb60b2
files src/http/v2/ngx_http_v2.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -3661,6 +3661,10 @@ ngx_http_v2_close_stream(ngx_http_v2_str
         }
     }
 
+    if (h2c->state.stream == stream) {
+        h2c->state.stream = NULL;
+    }
+
     node->stream = NULL;
 
     ngx_queue_insert_tail(&h2c->closed, &node->reuse);