comparison src/event/ngx_event_pipe.c @ 163:fb61ba77beba

nginx-0.0.1-2003-10-28-18:45:41 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 28 Oct 2003 15:45:41 +0000
parents 46eb23d9471d
children 84036764e215
comparison
equal deleted inserted replaced
162:96993d4d5067 163:fb61ba77beba
96 * and not to call ngx_recv_chain(). 96 * and not to call ngx_recv_chain().
97 */ 97 */
98 98
99 if (ngx_event_flags == NGX_HAVE_KQUEUE_EVENT) { 99 if (ngx_event_flags == NGX_HAVE_KQUEUE_EVENT) {
100 100
101 if (p->upstream->read->error) { 101 if (p->upstream->read->available == 0) {
102 ngx_log_error(NGX_LOG_ERR, p->log, p->upstream->read->error, 102 if (p->upstream->read->kq_eof) {
103 p->upstream->read->ready = 0;
104 p->upstream->read->eof = 0;
105 p->upstream_eof = 1;
106 p->read = 1;
107
108 if (p->upstream->read->kq_errno) {
109 p->upstream->read->error = 1;
110 p->upstream_error = 1;
111 p->upstream_eof = 0;
112
113 ngx_log_error(NGX_LOG_ERR, p->log,
114 p->upstream->read->kq_errno,
115 /* TODO: ngx_readv_chain_n */
116 "readv() failed");
117 }
118
119 break;
120 }
121 }
122
123 #if 0
124 if (p->upstream->read->kq_errno) {
125 ngx_log_error(NGX_LOG_ERR, p->log,
126 p->upstream->read->kq_errno,
103 "readv() failed"); 127 "readv() failed");
104 p->upstream_error = 1; 128 p->upstream_error = 1;
105 129
106 break; 130 break;
107 131
108 } else if (p->upstream->read->eof 132 } else if (p->upstream->read->kq_eof
109 && p->upstream->read->available == 0) { 133 && p->upstream->read->available == 0) {
110 p->upstream_eof = 1; 134 p->upstream_eof = 1;
111 p->read = 1; 135 p->read = 1;
112 136
113 break; 137 break;
114 } 138 }
139 #endif
140
115 } 141 }
116 #endif 142 #endif
117 143
118 if (p->free_raw_hunks) { 144 if (p->free_raw_hunks) {
119 145