Mercurial > hg > nginx
diff src/http/ngx_http_upstream.c @ 7371:8b68d50090e4
Upstream: proxy_socket_keepalive and friends.
The directives enable the use of the SO_KEEPALIVE option on
upstream connections. By default, the value is left unchanged.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 03 Oct 2018 14:08:51 +0300 |
parents | 15ea84e65d07 |
children | 860d3907da1c |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Wed Oct 03 17:02:44 2018 +0300 +++ b/src/http/ngx_http_upstream.c Wed Oct 03 14:08:51 2018 +0300 @@ -628,6 +628,10 @@ return; } + if (u->conf->socket_keepalive) { + u->peer.so_keepalive = 1; + } + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); u->output.alignment = clcf->directio_alignment;