mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Process events posted by ngx_close_idle_connections() immediately.
Previously, if an event was posted by a read event handler, called by ngx_close_idle_connections(), that event was not processed until the next event loop iteration, which could happen after a timeout.
This commit is contained in:
@@ -736,6 +736,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
|
|||||||
ngx_set_shutdown_timer(cycle);
|
ngx_set_shutdown_timer(cycle);
|
||||||
ngx_close_listening_sockets(cycle);
|
ngx_close_listening_sockets(cycle);
|
||||||
ngx_close_idle_connections(cycle);
|
ngx_close_idle_connections(cycle);
|
||||||
|
ngx_event_process_posted(cycle, &ngx_posted_events);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -804,6 +804,7 @@ ngx_worker_thread(void *data)
|
|||||||
ngx_set_shutdown_timer(cycle);
|
ngx_set_shutdown_timer(cycle);
|
||||||
ngx_close_listening_sockets(cycle);
|
ngx_close_listening_sockets(cycle);
|
||||||
ngx_close_idle_connections(cycle);
|
ngx_close_idle_connections(cycle);
|
||||||
|
ngx_event_process_posted(cycle, &ngx_posted_events);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user