aboutsummaryrefslogtreecommitdiff
path: root/src/http/v2/ngx_http_v2.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2021-04-16 19:35:55 +0300
committerSergey Kandaurov <pluknet@nginx.com>2021-04-16 19:35:55 +0300
commitf29e48f7eed3e0593098818b42bd17dee17cc601 (patch)
tree18ff22a5988a25aacc60c4beb836e98794dcb051 /src/http/v2/ngx_http_v2.c
parent8ba7adf037cc32300e19034e371a7add5222e47e (diff)
parenta64190933e06758d50eea926e6a55974645096fd (diff)
downloadnginx-f29e48f7eed3e0593098818b42bd17dee17cc601.tar.gz
nginx-f29e48f7eed3e0593098818b42bd17dee17cc601.zip
Merged with the default branch.
Diffstat (limited to 'src/http/v2/ngx_http_v2.c')
-rw-r--r--src/http/v2/ngx_http_v2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 856320589..3611a2e50 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -277,7 +277,7 @@ ngx_http_v2_init(ngx_event_t *rev)
h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
h2c->concurrent_pushes = h2scf->concurrent_pushes;
- h2c->priority_limit = h2scf->concurrent_streams;
+ h2c->priority_limit = ngx_max(h2scf->concurrent_streams, 100);
h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
if (h2c->pool == NULL) {
@@ -1369,7 +1369,9 @@ ngx_http_v2_state_headers(ngx_http_v2_connection_t *h2c, u_char *pos,
ngx_http_core_module);
if (clcf->keepalive_timeout == 0
- || h2c->connection->requests >= clcf->keepalive_requests)
+ || h2c->connection->requests >= clcf->keepalive_requests
+ || ngx_current_msec - h2c->connection->start_time
+ > clcf->keepalive_time)
{
h2c->goaway = 1;