]> git.kaiwu.me - nginx.git/commitdiff
if client closes a connection prematurely, then epoll (at least
authorIgor Sysoev <igor@sysoev.ru>
Thu, 15 Feb 2007 10:02:34 +0000 (10:02 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 15 Feb 2007 10:02:34 +0000 (10:02 +0000)
in Linux 2.6.16) sends EPOLLERR|EPOLLHUP|EPOLLIN only and writer
does not know about the error

src/http/ngx_http_request.c

index b366f79dda644b4cd762ab5e377788b645ea336b..c2e18b64c41964e620a0e3fd261b292a56ff1284 100644 (file)
@@ -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;