comparison src/http/modules/proxy/ngx_http_proxy_upstream.c @ 315:39b6f2df45c0

nginx-0.0.3-2004-04-14-21:44:28 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 14 Apr 2004 17:44:28 +0000
parents d71c87d11b16
children 6bdf858bff8c
comparison
equal deleted inserted replaced
314:d71c87d11b16 315:39b6f2df45c0
336 ngx_del_timer(r->connection->read); 336 ngx_del_timer(r->connection->read);
337 } 337 }
338 338
339 r->connection->read->event_handler = ngx_http_proxy_check_broken_connection; 339 r->connection->read->event_handler = ngx_http_proxy_check_broken_connection;
340 340
341 if (ngx_event_flags & (NGX_USE_CLEAR_EVENT|NGX_HAVE_KQUEUE_EVENT)) { 341 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) {
342
343 /* kqueue allows to detect when client closes prematurely connection */
344 342
345 r->connection->write->event_handler = 343 r->connection->write->event_handler =
346 ngx_http_proxy_check_broken_connection; 344 ngx_http_proxy_check_broken_connection;
347 345
348 if (!r->connection->write->active) { 346 if (!r->connection->write->active) {
625 623
626 p->request_sent = 0; 624 p->request_sent = 0;
627 625
628 if (rc == NGX_AGAIN) { 626 if (rc == NGX_AGAIN) {
629 ngx_add_timer(c->write, p->lcf->connect_timeout); 627 ngx_add_timer(c->write, p->lcf->connect_timeout);
630
631 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
632 "http proxy connect handler: " PTR_FMT,
633 c->write->event_handler);
634
635 return; 628 return;
636 } 629 }
637 630
638 /* rc == NGX_OK */ 631 /* rc == NGX_OK */
639 632