comparison src/os/unix/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 f2ff291bbdac
children 8852f39311de
comparison
equal deleted inserted replaced
8102:49e7db44b57c 8103:b809f53d3f5b
734 if (!ngx_exiting) { 734 if (!ngx_exiting) {
735 ngx_exiting = 1; 735 ngx_exiting = 1;
736 ngx_set_shutdown_timer(cycle); 736 ngx_set_shutdown_timer(cycle);
737 ngx_close_listening_sockets(cycle); 737 ngx_close_listening_sockets(cycle);
738 ngx_close_idle_connections(cycle); 738 ngx_close_idle_connections(cycle);
739 ngx_event_process_posted(cycle, &ngx_posted_events);
739 } 740 }
740 } 741 }
741 742
742 if (ngx_reopen) { 743 if (ngx_reopen) {
743 ngx_reopen = 0; 744 ngx_reopen = 0;