diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-07-29 13:23:16 +0400 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-07-29 13:23:16 +0400 |
commit | e49d933ebccb5e86b749c94ddb378dafc28e435d (patch) | |
tree | 54340aac2f246e9be425237df7981ff6980c3f6e /src | |
parent | 5274f023a243e4163bcdb1b93e00445e769a8ff9 (diff) | |
download | nginx-e49d933ebccb5e86b749c94ddb378dafc28e435d.tar.gz nginx-e49d933ebccb5e86b749c94ddb378dafc28e435d.zip |
Upstream: reliably detect connection failures with SSL peers.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |