diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index 3dd22303f..f133b7249 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c @@ -371,7 +371,7 @@ ngx_devpoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, err = (events == -1) ? ngx_errno : 0; - if (flags & NGX_UPDATE_TIME) { + if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) { ngx_time_update(0, 0); } diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c index dc5d4226e..3c1ca2ac2 100644 --- a/src/event/modules/ngx_epoll_module.c +++ b/src/event/modules/ngx_epoll_module.c @@ -531,7 +531,7 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags) err = (events == -1) ? ngx_errno : 0; - if (flags & NGX_UPDATE_TIME) { + if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) { ngx_time_update(0, 0); } diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c index 02230ca7d..b6dfa8fa1 100644 --- a/src/event/modules/ngx_kqueue_module.c +++ b/src/event/modules/ngx_kqueue_module.c @@ -537,7 +537,7 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, err = (events == -1) ? ngx_errno : 0; - if (flags & NGX_UPDATE_TIME) { + if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) { ngx_time_update(0, 0); } diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 10098d61e..3b98c19fe 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c @@ -262,7 +262,7 @@ ngx_poll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags) err = (ready == -1) ? ngx_errno : 0; - if (flags & NGX_UPDATE_TIME) { + if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) { ngx_time_update(0, 0); } diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index e76da5b9f..9f5b43b71 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c @@ -262,7 +262,7 @@ ngx_select_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, err = (ready == -1) ? ngx_errno : 0; - if (flags & NGX_UPDATE_TIME) { + if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) { ngx_time_update(0, 0); } diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index 9c13eac47..3922b0e20 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -562,8 +562,6 @@ ngx_timer_signal_handler(int signo) { ngx_event_timer_alarm = 1; - ngx_time_update(0, 0); - #if 1 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ngx_cycle->log, 0, "timer signal"); #endif