aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2016-02-24 16:05:46 +0300
committerValentin Bartenev <vbart@nginx.com>2016-02-24 16:05:46 +0300
commit8b40f1eaec90be72e791904b345db15f536dca45 (patch)
treed521bb6dc62d4443da5e23c88353c3ec9de07c37 /src
parent1d294eea3eff92d62057eecdba5024cf273b76ca (diff)
downloadnginx-8b40f1eaec90be72e791904b345db15f536dca45.tar.gz
nginx-8b40f1eaec90be72e791904b345db15f536dca45.zip
HTTP/2: cleaned up state while closing stream.
Without this the state might keep pointing to already closed stream.
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 4e378c9dc..0447534e7 100644
--- 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_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);