diff options
author | Ruslan Ermilov <ru@nginx.com> | 2019-08-13 15:43:36 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2019-08-13 15:43:36 +0300 |
commit | a987f81dd19210bc30b62591db331e31d3d74089 (patch) | |
tree | 9cf48df4a1d391abde117309eef61293f9a8f0de /src/http/v2/ngx_http_v2.c | |
parent | 6dfbc8b1c2116f362bb871efebbf9df576738e89 (diff) | |
download | nginx-a987f81dd19210bc30b62591db331e31d3d74089.tar.gz nginx-a987f81dd19210bc30b62591db331e31d3d74089.zip |
HTTP/2: limited number of DATA frames.
Fixed excessive memory growth and CPU usage if stream windows are
manipulated in a way that results in generating many small DATA frames.
Fix is to limit the number of simultaneously allocated DATA frames.
Diffstat (limited to 'src/http/v2/ngx_http_v2.c')
-rw-r--r-- | src/http/v2/ngx_http_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 72d5aa508..88e2bb9fb 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -4369,6 +4369,8 @@ ngx_http_v2_close_stream(ngx_http_v2_stream_t *stream, ngx_int_t rc) */ pool = stream->pool; + h2c->frames -= stream->frames; + ngx_http_free_request(stream->request, rc); if (pool != h2c->state.pool) { |