]> git.kaiwu.me - nginx.git/commit
HTTP/2: fixed possible alert about left open socket on shutdown.
authorRuslan Ermilov <ru@nginx.com>
Mon, 23 Sep 2019 12:45:32 +0000 (15:45 +0300)
committerRuslan Ermilov <ru@nginx.com>
Mon, 23 Sep 2019 12:45:32 +0000 (15:45 +0300)
commitf878492af35224a4ade84f6f6c15aca2892d3821
tree9762edd647c167f571e2df7dbdedf97faacfb354
parentaf0e284b967d0ecff1abcdce6558ed4635e3e757
HTTP/2: fixed possible alert about left open socket on shutdown.

This could happen when graceful shutdown configured by worker_shutdown_timeout
times out and is then followed by another timeout such as proxy_read_timeout.
In this case, the HEADERS frame is added to the output queue, but attempt to
send it fails (due to c->error forcibly set during graceful shutdown timeout).
This triggers request finalization which attempts to close the stream.  But the
stream cannot be closed because there is a frame in the output queue, and the
connection cannot be finalized.  This leaves the connection open without any
timer events leading to alert.

The fix is to post write event when sending output queue fails on c->error.
That will finalize the connection.
src/http/v2/ngx_http_v2.c