]> git.kaiwu.me - nginx.git/commit
Core: delete accept timer on worker shutdown
authorRoman Arutyunyan <arut@nginx.com>
Thu, 20 Aug 2026 12:53:42 +0000 (16:53 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 25 Aug 2026 17:33:21 +0000 (21:33 +0400)
commit76364bdd29acef7698b0a73d4bc65f2e91eb50f4
tree93aa5e6c4e14b89628179aeea703b500b434e205
parentee03ec42c4dcd21fcbd3c3bd9d804b9d5045fe9d
Core: delete accept timer on worker shutdown

Previously, when the worker file descriptor table was full, a listen
connection might be disabled and a timeout might be set for re-enabling
it.  If during this period the worker received the NGX_CMD_QUIT signal,
the accept connection would be recycled, but the timer would remain set.
On timer expiration, an attempt to accept a new connection would result
in "accept4() failed (9: Bad file descriptor)" alert because c->fd was
reset to -1.

Fix is to delete accept timer when closing listen connections.
src/core/ngx_connection.c