From: Igor Sysoev Date: Thu, 15 Feb 2007 10:02:34 +0000 (+0000) Subject: if client closes a connection prematurely, then epoll (at least X-Git-Tag: release-0.5.13~9 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=9d58e4bed39b664e44d57efb9014085948b97241;p=nginx.git if client closes a connection prematurely, then epoll (at least in Linux 2.6.16) sends EPOLLERR|EPOLLHUP|EPOLLIN only and writer does not know about the error --- diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index b366f79dd..c2e18b64c 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1653,6 +1653,7 @@ ngx_http_set_write_handler(ngx_http_request_t *r) r->http_state = NGX_HTTP_WRITING_REQUEST_STATE; + r->read_event_handler = ngx_http_block_read; r->write_event_handler = ngx_http_writer; wev = r->connection->write;