From: Ruslan Ermilov Date: Mon, 29 Jul 2013 09:23:16 +0000 (+0400) Subject: Upstream: reliably detect connection failures with SSL peers. X-Git-Tag: release-1.5.3~2 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=e49d933ebccb5e86b749c94ddb378dafc28e435d;p=nginx.git Upstream: reliably detect connection failures with SSL peers. --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index cd946340a..9e2830d07 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1282,6 +1282,11 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r, { ngx_int_t rc; + if (ngx_http_upstream_test_connect(c) != NGX_OK) { + ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR); + return; + } + if (ngx_ssl_create_connection(u->conf->ssl, c, NGX_SSL_BUFFER|NGX_SSL_CLIENT) != NGX_OK)