comparison src/os/win32/ngx_process_cycle.c @ 8103:b809f53d3f5b

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.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 18 Nov 2022 19:31:38 +0400
parents 8b84d60ef13d
children 791ead216b03
comparison
equal deleted inserted replaced
8102:49e7db44b57c 8103:b809f53d3f5b
802 if (!ngx_exiting) { 802 if (!ngx_exiting) {
803 ngx_exiting = 1; 803 ngx_exiting = 1;
804 ngx_set_shutdown_timer(cycle); 804 ngx_set_shutdown_timer(cycle);
805 ngx_close_listening_sockets(cycle); 805 ngx_close_listening_sockets(cycle);
806 ngx_close_idle_connections(cycle); 806 ngx_close_idle_connections(cycle);
807 ngx_event_process_posted(cycle, &ngx_posted_events);
807 } 808 }
808 } 809 }
809 810
810 if (ngx_reopen) { 811 if (ngx_reopen) {
811 ngx_reopen = 0; 812 ngx_reopen = 0;