comparison 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
comparison
equal deleted inserted replaced
7370:aa1c9f846567 7371:8b68d50090e4
626 if (ngx_http_upstream_set_local(r, u, u->conf->local) != NGX_OK) { 626 if (ngx_http_upstream_set_local(r, u, u->conf->local) != NGX_OK) {
627 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 627 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
628 return; 628 return;
629 } 629 }
630 630
631 if (u->conf->socket_keepalive) {
632 u->peer.so_keepalive = 1;
633 }
634
631 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 635 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
632 636
633 u->output.alignment = clcf->directio_alignment; 637 u->output.alignment = clcf->directio_alignment;
634 u->output.pool = r->pool; 638 u->output.pool = r->pool;
635 u->output.bufs.num = 1; 639 u->output.bufs.num = 1;