[nginx] Core: apply missed options to sockets added during binar...
Maxim Dounin
mdounin at mdounin.ru
Thu Oct 31 00:01:06 UTC 2013
details: http://hg.nginx.org/nginx/rev/d8ee8ef5dcde
branches:
changeset: 5430:d8ee8ef5dcde
user: Piotr Sikora <piotr at cloudflare.com>
date: Thu Oct 24 14:18:37 2013 -0700
description:
Core: apply missed options to sockets added during binary upgrade.
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 at cloudflare.com>
diffstat:
src/core/ngx_cycle.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -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
}
}
More information about the nginx-devel
mailing list