diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2016-11-14 17:21:06 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2016-11-14 17:21:06 +0300 |
| commit | bdc0b779e50cd3003e488e939b7d8006c8f47fd6 (patch) | |
| tree | 49a573519b393c77edb58b05f474067ed411d879 | |
| parent | 8f8a07f0801ea3a297bebe1ad9b25fcfcc278509 (diff) | |
| download | nginx-bdc0b779e50cd3003e488e939b7d8006c8f47fd6.tar.gz nginx-bdc0b779e50cd3003e488e939b7d8006c8f47fd6.tar.bz2 | |
Upstream: handling of upstream SSL handshake timeouts.
Previously SSL handshake timeouts were not properly logged, and resulted
in 502 errors instead of 504 (ticket #1126).
| -rw-r--r-- | src/http/ngx_http_upstream.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index a6dd55e66..ed25f438d 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1666,6 +1666,13 @@ ngx_http_upstream_ssl_handshake(ngx_connection_t *c) return; } + if (c->write->timedout) { + c = r->connection; + ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_TIMEOUT); + ngx_http_run_posted_requests(c); + return; + } + failed: c = r->connection; |
