comparison src/event/ngx_event_pipe.c @ 858:4766f61a8221

fix endless loop when too many FastCGI sent too many to stderr
author Igor Sysoev <igor@sysoev.ru>
date Sat, 18 Nov 2006 21:46:16 +0000
parents 3681cb9bde7d
children d1e8c59a50ee
comparison
equal deleted inserted replaced
857:739b997da512 858:4766f61a8221
293 } 293 }
294 } 294 }
295 295
296 p->read_length += n; 296 p->read_length += n;
297 cl = chain; 297 cl = chain;
298 p->free_raw_bufs = NULL;
298 299
299 while (cl && n > 0) { 300 while (cl && n > 0) {
300 301
301 ngx_event_pipe_remove_shadow_links(cl->buf); 302 ngx_event_pipe_remove_shadow_links(cl->buf);
302 303
320 cl->buf->last += n; 321 cl->buf->last += n;
321 n = 0; 322 n = 0;
322 } 323 }
323 } 324 }
324 325
325 p->free_raw_bufs = cl; 326 if (cl) {
327 while (cl->next) {
328 cl = cl->next;
329 }
330
331 cl->next = p->free_raw_bufs;
332 p->free_raw_bufs = cl;
333 }
326 } 334 }
327 335
328 #if (NGX_DEBUG) 336 #if (NGX_DEBUG)
329 337
330 for (cl = p->busy; cl; cl = cl->next) { 338 for (cl = p->busy; cl; cl = cl->next) {