aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mail/ngx_mail.c')
-rw-r--r--src/mail/ngx_mail.c13
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