mirror of
https://github.com/nginx/nginx.git
synced 2024-12-05 06:19:01 +08:00
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.
This commit is contained in:
parent
7b24c53efe
commit
4b2f12a604
@ -1393,6 +1393,11 @@ ngx_http_upstream_ssl_init_connection(ngx_http_request_t *r,
|
|||||||
rc = ngx_ssl_handshake(c);
|
rc = ngx_ssl_handshake(c);
|
||||||
|
|
||||||
if (rc == NGX_AGAIN) {
|
if (rc == NGX_AGAIN) {
|
||||||
|
|
||||||
|
if (!c->write->timer_set) {
|
||||||
|
ngx_add_timer(c->write, u->conf->connect_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
c->ssl->handler = ngx_http_upstream_ssl_handshake;
|
c->ssl->handler = ngx_http_upstream_ssl_handshake;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user