Mercurial > hg > nginx
diff src/event/ngx_event.c @ 567:1af2fcb3be8a release-0.3.5
nginx-0.3.5-RELEASE import
*) Bugfix: the segmentation fault may occurred if the IMAP/POP3 login
was changed by authorization server; the bug had appeared in 0.2.2.
*) Bugfix: the accept mutex did not work and all connections were
handled by one process; the bug had appeared in 0.3.3.
*) Bugfix: the timeout did not work if the "rtsig" method and the
"timer_resolution" directive were used.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Oct 2005 19:12:18 +0000 |
parents | 9c2f3ed7a247 |
children | 58475592100c |
line wrap: on
line diff
--- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -199,7 +199,7 @@ void ngx_process_events_and_timers(ngx_cycle_t *cycle) { ngx_uint_t flags; - ngx_msec_t timer; + ngx_msec_t timer, delta; if (ngx_timer_resolution) { timer = NGX_TIMER_INFINITE; @@ -240,16 +240,25 @@ ngx_process_events_and_timers(ngx_cycle_ } } + delta = ngx_current_msec; + (void) ngx_process_events(cycle, timer, flags); - ngx_event_expire_timers(); + delta = ngx_current_msec - delta; + + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, + "timer delta: %M", delta); + + if (delta) { + ngx_event_expire_timers(); + } if (ngx_posted_accept_events) { ngx_event_process_posted(cycle, &ngx_posted_accept_events); } if (ngx_accept_mutex_held) { - ngx_accept_mutex = 0; + *ngx_accept_mutex = 0; } ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,