mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 01:42:58 +08:00
fix client write event handling in ngx_http_limit_req_module
This commit is contained in:
parent
2e9542b910
commit
a4eb3f0e02
@ -263,9 +263,24 @@ done:
|
||||
static void
|
||||
ngx_http_limit_req_delay(ngx_http_request_t *r)
|
||||
{
|
||||
ngx_event_t *wev;
|
||||
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
|
||||
"limit_req delay");
|
||||
|
||||
wev = r->connection->write;
|
||||
|
||||
if (!wev->timedout) {
|
||||
|
||||
if (ngx_handle_write_event(wev, 0) != NGX_OK) {
|
||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
wev->timedout = 0;
|
||||
|
||||
if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) {
|
||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user