mirror of
https://github.com/nginx/nginx.git
synced 2026-10-21 19:41:35 +00:00
HTTP/2: close connections initialized during graceful shutdown.
In some rare cases, graceful shutdown may happen while initializing an HTTP/2 connection. Previously, such a connection ignored the shutdown and remained active. Now it is gracefully closed prior to processing any streams to eliminate the shutdown delay.
This commit is contained in:
parent
788e462c5b
commit
145b228530
1 changed files with 5 additions and 0 deletions
|
|
@ -292,6 +292,11 @@ ngx_http_v2_init(ngx_event_t *rev)
|
|||
|
||||
c->data = h2c;
|
||||
|
||||
if (ngx_exiting) {
|
||||
ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
rev->handler = ngx_http_v2_read_handler;
|
||||
c->write->handler = ngx_http_v2_write_handler;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue