Mercurial > hg > nginx
diff src/mail/ngx_mail.c @ 4323:c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
The "so_keepalive" directive in mail module was deprecated.
Thanks to Vsevolod Stakhov for initial work.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 05 Dec 2011 08:06:15 +0000 |
parents | a96a8c916b0c |
children | d620f497c50f |
line wrap: on
line diff
--- a/src/mail/ngx_mail.c Wed Nov 30 10:01:11 2011 +0000 +++ b/src/mail/ngx_mail.c Mon Dec 05 08:06:15 2011 +0000 @@ -308,6 +308,12 @@ addr->ctx = listen->ctx; addr->bind = listen->bind; addr->wildcard = listen->wildcard; + addr->so_keepalive = listen->so_keepalive; +#if (NGX_HAVE_KEEPALIVE_TUNABLE) + addr->tcp_keepidle = listen->tcp_keepidle; + addr->tcp_keepintvl = listen->tcp_keepintvl; + addr->tcp_keepcnt = listen->tcp_keepcnt; +#endif #if (NGX_MAIL_SSL) addr->ssl = listen->ssl; #endif @@ -373,6 +379,13 @@ ls->log.data = &ls->addr_text; ls->log.handler = ngx_accept_log_error; + ls->keepalive = addr[i].so_keepalive; +#if (NGX_HAVE_KEEPALIVE_TUNABLE) + ls->keepidle = addr[i].tcp_keepidle; + ls->keepintvl = addr[i].tcp_keepintvl; + ls->keepcnt = addr[i].tcp_keepcnt; +#endif + #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) ls->ipv6only = addr[i].ipv6only; #endif