]> git.kaiwu.me - nginx.git/commit
Fixed handling of already closed connections.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 28 Mar 2021 14:45:39 +0000 (17:45 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 28 Mar 2021 14:45:39 +0000 (17:45 +0300)
commit179c79ce8afd459acffa50e6dabc60b0b7d9a014
treefc91c504be21a6c5c593d85b4e3323d503a71018
parent8885c45e1ead18c1fc9325e372069ec9c55e5938
Fixed handling of already closed connections.

In limit_req, auth_delay, and upstream code to check for broken
connections, tests for possible connection close by the client
did not work if the connection was already closed when relevant
event handler was set.  This happened because there were no additional
events in case of edge-triggered event methods, and read events
were disabled in case of level-triggered ones.

Fix is to explicitly post a read event if the c->read->ready flag
is set.
src/http/modules/ngx_http_limit_req_module.c
src/http/ngx_http_core_module.c
src/http/ngx_http_upstream.c