Mercurial > hg > nginx
comparison src/core/ngx_cycle.c @ 257:70e1c7d2b83d
nginx-0.0.2-2004-02-11-20:08:49 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Feb 2004 17:08:49 +0000 |
parents | e6938ca7331a |
children | 0ba4821f4460 |
comparison
equal
deleted
inserted
replaced
256:8e39cab6abd5 | 257:70e1c7d2b83d |
---|---|
462 ngx_cycle_t **cycle; | 462 ngx_cycle_t **cycle; |
463 | 463 |
464 log = ngx_cycle->log; | 464 log = ngx_cycle->log; |
465 ngx_temp_pool->log = log; | 465 ngx_temp_pool->log = log; |
466 | 466 |
467 ngx_log_debug(log, "clean old cycles"); | 467 ngx_log_debug0(NGX_LOG_DEBUG_CORE, log, 0, "clean old cycles"); |
468 | 468 |
469 live = 0; | 469 live = 0; |
470 | 470 |
471 cycle = ngx_old_cycles.elts; | 471 cycle = ngx_old_cycles.elts; |
472 for (i = 0; i < ngx_old_cycles.nelts; i++) { | 472 for (i = 0; i < ngx_old_cycles.nelts; i++) { |
478 found = 0; | 478 found = 0; |
479 | 479 |
480 for (n = 0; n < cycle[i]->connection_n; n++) { | 480 for (n = 0; n < cycle[i]->connection_n; n++) { |
481 if (cycle[i]->connections[n].fd != -1) { | 481 if (cycle[i]->connections[n].fd != -1) { |
482 found = 1; | 482 found = 1; |
483 ngx_log_debug(log, "live fd: %d" _ n); | 483 |
484 ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "live fd:%d", n); | |
485 | |
484 break; | 486 break; |
485 } | 487 } |
486 } | 488 } |
487 | 489 |
488 if (found) { | 490 if (found) { |
489 live = 1; | 491 live = 1; |
490 continue; | 492 continue; |
491 } | 493 } |
492 | 494 |
493 ngx_log_debug(log, "clean old cycle: %d" _ i); | 495 ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "clean old cycle: %d", i); |
496 | |
494 ngx_destroy_pool(cycle[i]->pool); | 497 ngx_destroy_pool(cycle[i]->pool); |
495 cycle[i] = NULL; | 498 cycle[i] = NULL; |
496 } | 499 } |
497 | 500 |
498 ngx_log_debug(log, "old cycles status: %d" _ live); | 501 ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "old cycles status: %d", live); |
499 | 502 |
500 if (live) { | 503 if (live) { |
501 ngx_log_debug(log, "TIMER"); | |
502 ngx_add_timer(ev, 30000); | 504 ngx_add_timer(ev, 30000); |
503 | 505 |
504 } else { | 506 } else { |
505 ngx_destroy_pool(ngx_temp_pool); | 507 ngx_destroy_pool(ngx_temp_pool); |
506 ngx_temp_pool = NULL; | 508 ngx_temp_pool = NULL; |