]> git.kaiwu.me - nginx.git/commitdiff
Core: apply missed options to sockets added during binary upgrade.
authorPiotr Sikora <piotr@cloudflare.com>
Thu, 24 Oct 2013 21:18:37 +0000 (14:18 -0700)
committerPiotr Sikora <piotr@cloudflare.com>
Thu, 24 Oct 2013 21:18:37 +0000 (14:18 -0700)
The accept_filter and deferred options were not applied to sockets
that were added to configuration during binary upgrade cycle.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
src/core/ngx_cycle.c

index eb39ab2537af66293c2ffd8db922b69e21e1fd4b..96345192aebc4340f2fb7fcc758e3949a0cc9f4e 100644 (file)
@@ -545,6 +545,16 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
 
             if (nls[n].fd == (ngx_socket_t) -1) {
                 nls[n].open = 1;
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
+                if (nls[n].accept_filter) {
+                    nls[n].add_deferred = 1;
+                }
+#endif
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
+                if (nls[n].deferred_accept) {
+                    nls[n].add_deferred = 1;
+                }
+#endif
             }
         }