diff options
author | Valentin Bartenev <vbart@nginx.com> | 2011-12-05 08:06:15 +0000 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2011-12-05 08:06:15 +0000 |
commit | 92edf47ff998f174bab2d99c26f59991def2aa4e (patch) | |
tree | 6e514194ae2b9d4f43da303fe30d8ce6962e928b /src/mail/ngx_mail.c | |
parent | 1ea2eb56ef2e26873b71c951b34f5cb98c0a2c53 (diff) | |
download | nginx-92edf47ff998f174bab2d99c26f59991def2aa4e.tar.gz nginx-92edf47ff998f174bab2d99c26f59991def2aa4e.zip |
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.
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r-- | src/mail/ngx_mail.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mail/ngx_mail.c b/src/mail/ngx_mail.c index 3eeb97fe0..0234d18ef 100644 --- a/src/mail/ngx_mail.c +++ b/src/mail/ngx_mail.c @@ -308,6 +308,12 @@ found: 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 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports) 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 |