diff 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
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -736,6 +736,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cy
                 ngx_set_shutdown_timer(cycle);
                 ngx_close_listening_sockets(cycle);
                 ngx_close_idle_connections(cycle);
+                ngx_event_process_posted(cycle, &ngx_posted_events);
             }
         }