comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 140:e32405df0e77

nginx-0.0.1-2003-10-08-08:34:07 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 08 Oct 2003 04:34:07 +0000
parents 54307053f185
children 656d468f4ead
comparison
equal deleted inserted replaced
139:54307053f185 140:e32405df0e77
777 p = c->data; 777 p = c->data;
778 778
779 ngx_log_debug(rev->log, "http proxy process upstream body"); 779 ngx_log_debug(rev->log, "http proxy process upstream body");
780 780
781 if (rev->timedout) { 781 if (rev->timedout) {
782 ngx_http_proxy_next_upstream(p); 782 ngx_http_proxy_close_connection(p->upstream.connection);
783 p->upstream.connection = NULL;
783 return; 784 return;
784 } 785 }
785 786
786 ngx_event_proxy_read_upstream(p->event_proxy); 787 ngx_event_proxy_read_upstream(p->event_proxy);
788
789 if (p->event_proxy->upstream_eof) {
790 ngx_http_proxy_close_connection(p->upstream.connection);
791 p->upstream.connection = NULL;
792 return;
793 }
794
795 if (p->event_proxy->upstream_error) {
796 ngx_http_proxy_close_connection(p->upstream.connection);
797 p->upstream.connection = NULL;
798 return;
799 }
787 800
788 return; 801 return;
789 } 802 }
790 803
791 804
1041 if (c->write->timer_set) { 1054 if (c->write->timer_set) {
1042 ngx_del_timer(c->write); 1055 ngx_del_timer(c->write);
1043 c->write->timer_set = 0; 1056 c->write->timer_set = 0;
1044 } 1057 }
1045 1058
1059 /* TODO: move connection to the connection pool */
1060
1046 if (ngx_del_conn) { 1061 if (ngx_del_conn) {
1047 ngx_del_conn(c); 1062 ngx_del_conn(c);
1048 1063
1049 } else { 1064 } else {
1050 if (c->read->active) { 1065 if (c->read->active) {