From 68df19d33ac5cf804650261867afd5f8acdce364 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 15 Apr 2004 15:34:36 +0000 Subject: nginx-0.0.3-2004-04-15-19:34:36 import --- src/http/modules/proxy/ngx_http_proxy_handler.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/http/modules') diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c index d7cbf9608..027dc3ccc 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.c +++ b/src/http/modules/proxy/ngx_http_proxy_handler.c @@ -428,18 +428,22 @@ void ngx_http_proxy_check_broken_connection(ngx_event_t *ev) err = ngx_socket_errno; + /* + * we do not need to disable the write event because + * that event has NGX_USE_CLEAR_EVENT type + */ + if (ev->write && (n >= 0 || err == NGX_EAGAIN)) { return; } - if (n > 0) { - if ((ngx_event_flags & NGX_USE_LEVEL_EVENT) && ev->active) { - if (ngx_del_event(ev, NGX_READ_EVENT, 0) == NGX_ERROR) { - ngx_http_proxy_finalize_request(p, - NGX_HTTP_INTERNAL_SERVER_ERROR); - } + if ((ngx_event_flags & NGX_USE_LEVEL_EVENT) && ev->active) { + if (ngx_del_event(ev, NGX_READ_EVENT, 0) == NGX_ERROR) { + ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR); } + } + if (n > 0) { return; } -- cgit