summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2011-12-05 08:06:15 +0000
committerValentin Bartenev <vbart@nginx.com>2011-12-05 08:06:15 +0000
commit92edf47ff998f174bab2d99c26f59991def2aa4e (patch)
tree6e514194ae2b9d4f43da303fe30d8ce6962e928b /src/http/ngx_http.c
parent1ea2eb56ef2e26873b71c951b34f5cb98c0a2c53 (diff)
downloadnginx-92edf47ff998f174bab2d99c26f59991def2aa4e.tar.gz
nginx-92edf47ff998f174bab2d99c26f59991def2aa4e.tar.bz2
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 '')
-rw-r--r--src/http/ngx_http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 1eb22f81e..e10dbc88d 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1762,6 +1762,13 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
ls->rcvbuf = addr->opt.rcvbuf;
ls->sndbuf = addr->opt.sndbuf;
+ ls->keepalive = addr->opt.so_keepalive;
+#if (NGX_HAVE_KEEPALIVE_TUNABLE)
+ ls->keepidle = addr->opt.tcp_keepidle;
+ ls->keepintvl = addr->opt.tcp_keepintvl;
+ ls->keepcnt = addr->opt.tcp_keepcnt;
+#endif
+
#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
ls->accept_filter = addr->opt.accept_filter;
#endif