mirror of
https://github.com/nginx/nginx.git
synced 2026-10-22 03:51:14 +00:00
left open sockets were not really tested
This commit is contained in:
parent
7c4cf27aff
commit
02aa53be83
2 changed files with 6 additions and 5 deletions
|
|
@ -136,6 +136,7 @@ struct ngx_event_s {
|
|||
|
||||
/* to test on worker exit */
|
||||
unsigned channel:1;
|
||||
unsigned resolver:1;
|
||||
|
||||
#if (NGX_THREADS)
|
||||
|
||||
|
|
|
|||
|
|
@ -994,18 +994,18 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
|||
}
|
||||
}
|
||||
|
||||
if (ngx_quit) {
|
||||
if (ngx_exiting) {
|
||||
c = cycle->connections;
|
||||
for (i = 0; i < cycle->connection_n; i++) {
|
||||
if (c[i].fd != -1
|
||||
&& c[i].read
|
||||
&& !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,
|
||||
"open socket #%d left in %ui connection, "
|
||||
"aborting",
|
||||
c[i].fd, i);
|
||||
"open socket #%d left in %ui connection %s",
|
||||
c[i].fd, i, ngx_debug_quit ? ", aborting" : "");
|
||||
ngx_debug_point();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue