[nginx] HTTP/2: cleaned up state while closing stream.

Valentin Bartenev vbart at nginx.com
Wed Feb 24 13:08:42 UTC 2016


details:   http://hg.nginx.org/nginx/rev/c6ccc1ea9450
branches:  
changeset: 6410:c6ccc1ea9450
user:      Valentin Bartenev <vbart at nginx.com>
date:      Wed Feb 24 16:05:46 2016 +0300
description:
HTTP/2: cleaned up state while closing stream.

Without this the state might keep pointing to already closed stream.

diffstat:

 src/http/v2/ngx_http_v2.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 71edd9192f24 -r c6ccc1ea9450 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c	Wed Feb 24 16:01:23 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c	Wed Feb 24 16:05:46 2016 +0300
@@ -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);



More information about the nginx-devel mailing list