diff 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
line wrap: on
line diff
--- a/src/os/win32/ngx_process_cycle.c
+++ b/src/os/win32/ngx_process_cycle.c
@@ -804,6 +804,7 @@ ngx_worker_thread(void *data)
                 ngx_set_shutdown_timer(cycle);
                 ngx_close_listening_sockets(cycle);
                 ngx_close_idle_connections(cycle);
+                ngx_event_process_posted(cycle, &ngx_posted_events);
             }
         }