]> git.kaiwu.me - nginx.git/commit
Reuse of connections in lingering close.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 11 Feb 2021 18:52:09 +0000 (21:52 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 11 Feb 2021 18:52:09 +0000 (21:52 +0300)
commitfb2a2152d756f23ce191ab109116585f90acf087
treed52fd9885ae461bca64cc3f51452e76d6ad6f77f
parent327e21c43293ecfdbd116bd572ee08b7d8066b24
Reuse of connections in lingering close.

This is particularly important in HTTP/2, where keepalive connections
are closed with lingering.  Before the patch, reusing a keepalive HTTP/2
connection resulted in the connection waiting for lingering close to
remain in the reusable connections queue, preventing ngx_drain_connections()
from closing additional connections.

The patch fixes it by marking the connection reusable again, and so
moving it in the reusable connections queue.  Further, it makes actually
possible to reuse such connections if needed.
src/http/ngx_http_request.c
src/http/v2/ngx_http_v2.c