aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/proxy/ngx_http_proxy_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-04-15 15:34:36 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-04-15 15:34:36 +0000
commit68df19d33ac5cf804650261867afd5f8acdce364 (patch)
tree5a49e42b41da04ea73eec12d0f402730e3268ca1 /src/http/modules/proxy/ngx_http_proxy_handler.c
parentcccc5528945be46d6afb456e7aba751340af9089 (diff)
downloadnginx-68df19d33ac5cf804650261867afd5f8acdce364.tar.gz
nginx-68df19d33ac5cf804650261867afd5f8acdce364.zip
nginx-0.0.3-2004-04-15-19:34:36 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_handler.c')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_handler.c16
1 files changed, 10 insertions, 6 deletions
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;
}