diff src/http/ngx_http.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 57d45d345651
children d620f497c50f
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1762,6 +1762,13 @@ ngx_http_add_listening(ngx_conf_t *cf, n
     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