comparison src/os/win32/ngx_process_cycle.c @ 9201:791ead216b03

Silenced complaints about socket leaks on forced termination. When graceful shutdown was requested, and then nginx was forced to do fast shutdown, it used to (incorrectly) complain about open sockets left in connections which weren't yet closed when fast shutdown was requested. Fix is to avoid complaining about open sockets when fast shutdown was requested after graceful one. Abnormal termination, if requested with the WINCH signal, can still happen though.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 29 Jan 2024 10:29:39 +0300
parents b809f53d3f5b
children
comparison
equal deleted inserted replaced
9200:ee40e2b1d083 9201:791ead216b03
832 if (cycle->modules[i]->exit_process) { 832 if (cycle->modules[i]->exit_process) {
833 cycle->modules[i]->exit_process(cycle); 833 cycle->modules[i]->exit_process(cycle);
834 } 834 }
835 } 835 }
836 836
837 if (ngx_exiting) { 837 if (ngx_exiting && !ngx_terminate) {
838 c = cycle->connections; 838 c = cycle->connections;
839 for (i = 0; i < cycle->connection_n; i++) { 839 for (i = 0; i < cycle->connection_n; i++) {
840 if (c[i].fd != (ngx_socket_t) -1 840 if (c[i].fd != (ngx_socket_t) -1
841 && c[i].read 841 && c[i].read
842 && !c[i].read->accept 842 && !c[i].read->accept