Welcome! Log In Create A New Profile

Advanced

[nginx] Core: apply missed options to sockets added during binar...

Maxim Dounin
October 30, 2013 08:02PM
details: http://hg.nginx.org/nginx/rev/d8ee8ef5dcde
branches:
changeset: 5430:d8ee8ef5dcde
user: Piotr Sikora <piotr@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@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
}
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Core: apply missed options to sockets added during binar...

Maxim Dounin 577 October 30, 2013 08:02PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready