mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
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.
This commit is contained in:
parent
f255815f5d
commit
cc4c3ee0a4
@ -948,7 +948,7 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
||||
}
|
||||
}
|
||||
|
||||
if (ngx_exiting) {
|
||||
if (ngx_exiting && !ngx_terminate) {
|
||||
c = cycle->connections;
|
||||
for (i = 0; i < cycle->connection_n; i++) {
|
||||
if (c[i].fd != -1
|
||||
@ -963,12 +963,12 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
||||
ngx_debug_quit = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ngx_debug_quit) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, "aborting");
|
||||
ngx_debug_point();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy ngx_cycle->log related data to the special static exit cycle,
|
||||
|
@ -834,7 +834,7 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
||||
}
|
||||
}
|
||||
|
||||
if (ngx_exiting) {
|
||||
if (ngx_exiting && !ngx_terminate) {
|
||||
c = cycle->connections;
|
||||
for (i = 0; i < cycle->connection_n; i++) {
|
||||
if (c[i].fd != (ngx_socket_t) -1
|
||||
|
Loading…
Reference in New Issue
Block a user