Events: simplified cycle in ngx_event_expire_timers().

This commit is contained in:
Valentin Bartenev 2014-08-25 13:37:06 +04:00
parent 246152c864
commit 16403bc7b1

View File

@ -67,9 +67,12 @@ ngx_event_expire_timers(void)
node = ngx_rbtree_min(root, sentinel);
/* node->key <= ngx_current_time */
/* node->key > ngx_current_time */
if ((ngx_msec_int_t) (node->key - ngx_current_msec) > 0) {
return;
}
if ((ngx_msec_int_t) (node->key - ngx_current_msec) <= 0) {
ev = (ngx_event_t *) ((char *) node - offsetof(ngx_event_t, timer));
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
@ -89,10 +92,5 @@ ngx_event_expire_timers(void)
ev->timedout = 1;
ev->handler(ev);
continue;
}
break;
}
}