Upstream: reliably detect connection failures with SSL peers.

This commit is contained in:
Ruslan Ermilov 2013-07-29 13:23:16 +04:00
parent 5b947ec9ab
commit 1fac169aa3
1 changed files with 5 additions and 0 deletions

View File

@ -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)