Hi As the following codes.
buffer->event->handler = ngx_http_log_flush_handler; static void ngx_http_log_flush_handler(ngx_event_t *ev) { ... if (ev->timedout) { ngx_http_log_flush(ev->data, ev->log); return; } ... } static void ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log) { ... if (buffer->event && buffer->event->timer_set) { ngx_del_timer(buffer->event); } } I find there are two functions explicitly call event handler. 1. ngx_event_cancel_timers happened as long as worker process quits. 2. ngx_event_expire_timers in ngx_process_events_and_timers. And they remove timer from timer rbtree, then set timer_set zero. After that they call event->handler. So why we call ngx_del_timer in ngx_http_log_flush again? Thanks. B.R~
_______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel