]> git.kaiwu.me - nginx.git/commitdiff
left open sockets were not really tested
authorIgor Sysoev <igor@sysoev.ru>
Thu, 28 Feb 2008 20:31:33 +0000 (20:31 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 28 Feb 2008 20:31:33 +0000 (20:31 +0000)
src/event/ngx_event.h
src/os/unix/ngx_process_cycle.c

index a96b8bab9fd64822e1ad7d8cce78ecafcd7ac137..33c8cdc2d7d9bdac5b12228540a2467c4a61b0b9 100644 (file)
@@ -136,6 +136,7 @@ struct ngx_event_s {
 
     /* to test on worker exit */
     unsigned         channel:1;
+    unsigned         resolver:1;
 
 #if (NGX_THREADS)
 
index 96387f04a8411cf0077948dcae31c4a4672c101b..73b9d690ac0a20bc30f08bf5e760ef9cca6285df 100644 (file)
@@ -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();
             }
         }