Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5774:9bf58a3da25b
Upstream: SSL handshake timeouts.
Timeout may not be set on an upstream connection when we call
ngx_ssl_handshake() in ngx_http_upstream_ssl_init_connection(),
so make sure to arm it if it's not set.
Based on a patch by Yichun Zhang.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 28 Jul 2014 18:30:14 +0400 |
parents | 9de5820bb3e0 |
children | fe8bafab5b49 |
comparison
equal
deleted
inserted
replaced
5773:494c2c2a0247 | 5774:9bf58a3da25b |
---|---|
1391 r->connection->log->action = "SSL handshaking to upstream"; | 1391 r->connection->log->action = "SSL handshaking to upstream"; |
1392 | 1392 |
1393 rc = ngx_ssl_handshake(c); | 1393 rc = ngx_ssl_handshake(c); |
1394 | 1394 |
1395 if (rc == NGX_AGAIN) { | 1395 if (rc == NGX_AGAIN) { |
1396 | |
1397 if (!c->write->timer_set) { | |
1398 ngx_add_timer(c->write, u->conf->connect_timeout); | |
1399 } | |
1400 | |
1396 c->ssl->handler = ngx_http_upstream_ssl_handshake; | 1401 c->ssl->handler = ngx_http_upstream_ssl_handshake; |
1397 return; | 1402 return; |
1398 } | 1403 } |
1399 | 1404 |
1400 ngx_http_upstream_ssl_handshake(c); | 1405 ngx_http_upstream_ssl_handshake(c); |