commit | e49d933ebccb5e86b749c94ddb378dafc28e435d | [log] [tgz] |
---|---|---|
author | Ruslan Ermilov <ru@nginx.com> | Mon Jul 29 13:23:16 2013 +0400 |
committer | Ruslan Ermilov <ru@nginx.com> | Mon Jul 29 13:23:16 2013 +0400 |
tree | 54340aac2f246e9be425237df7981ff6980c3f6e | |
parent | 5274f023a243e4163bcdb1b93e00445e769a8ff9 [diff] |
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 cd94634..9e2830d 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c
@@ -1282,6 +1282,11 @@ { 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)