mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
left open sockets were not really tested
This commit is contained in:
parent
7c4cf27aff
commit
02aa53be83
@ -136,6 +136,7 @@ struct ngx_event_s {
|
|||||||
|
|
||||||
/* to test on worker exit */
|
/* to test on worker exit */
|
||||||
unsigned channel:1;
|
unsigned channel:1;
|
||||||
|
unsigned resolver:1;
|
||||||
|
|
||||||
#if (NGX_THREADS)
|
#if (NGX_THREADS)
|
||||||
|
|
||||||
|
@ -994,18 +994,18 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_quit) {
|
if (ngx_exiting) {
|
||||||
c = cycle->connections;
|
c = cycle->connections;
|
||||||
for (i = 0; i < cycle->connection_n; i++) {
|
for (i = 0; i < cycle->connection_n; i++) {
|
||||||
if (c[i].fd != -1
|
if (c[i].fd != -1
|
||||||
&& c[i].read
|
&& c[i].read
|
||||||
&& !c[i].read->accept
|
&& !c[i].read->accept
|
||||||
&& !c[i].read->channel)
|
&& !c[i].read->channel
|
||||||
|
&& !c[i].read->resolver)
|
||||||
{
|
{
|
||||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||||
"open socket #%d left in %ui connection, "
|
"open socket #%d left in %ui connection %s",
|
||||||
"aborting",
|
c[i].fd, i, ngx_debug_quit ? ", aborting" : "");
|
||||||
c[i].fd, i);
|
|
||||||
ngx_debug_point();
|
ngx_debug_point();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user