Skip to content

Commit

Permalink
Fix nginx worker process looping on timer when quit/terminate/reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Brice Figureau committed Jun 25, 2008
1 parent 33a331d commit a1eaf20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ngx_http_uploadprogress_module.c
Expand Up @@ -842,7 +842,9 @@ ngx_clean_old_connections(ngx_event_t * ev)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, shm_zone->shm.log, 0,
"uploadprogress clean old connections restarting timer");

ngx_add_timer(ev, TIMER_FREQUENCY); /* trigger again in 60s */
/* don't reschedule timer if ngx_quit or ngx_terminate && nodes emtpy */
if ( !(ngx_quit || ngx_terminate) && (ngx_rbtree_node_t *) ctx->list_tail.prev != &ctx->list_head.node )
ngx_add_timer(ev, TIMER_FREQUENCY); /* trigger again in 60s */

ngx_shmtx_unlock(&shpool->mutex);
}
Expand Down

0 comments on commit a1eaf20

Please sign in to comment.